Terminals 5 and 6 are connected airside via an underground tunnel, so it's not necessary to re-clear security again unless you have arrived on an international flight. They are also connected landside, but this would require re-clearing security for all passengers if they exit the terminal and leave the secure area.