If you are arriving on an International Flight (from not within the UK).... transferring to Terminal 5 (British Airways).... and you do not have to pick-up luggage..... then you must follow the purple signs at the Terminals for Flight Connections
An airport bus will transfer you between these terminals.... of course, you cannot exit anywhere during this transfer between terminals.... although the buses are pretty punctual, do ensure you have more than adequate time for the transfer and security check when you reach Terminal 5 (can get quite busy)
And, you do not require a transit visa for this..... unless you intend to exit London Heathrow