British Airways provide a lot of information on T5 on their website, including all about Flight Connections. I'd very much suggest you read through that.
To tackle the main bits, assuming you have a single ticket covering both legs of your journey:
- You will not pass through UK customs
- You will not pass through UK immigration
- Your bags will be checked through to your final BA destination, so won't have to be collected or re-checked. (Check the baggage tags given to you at checkin to ensure they have been tagged all the way through)
- If your starting airport is able, they'll give you your second boarding pass
- If not, you'll have to go to the flight connections desk to collect it
- On arrival, you'll follow the purple Flight Connections signs, and have your boarding pass + passport checked
- You will have to clear security, which is upstairs from flight connections, before you enter the main departures area of the terminal
As long as there are no flight delays on your inbound, 2 hours will be fine. Queues to get your boarding pass checked before security tend not to be too bad, and while security can be shocking at times, we're talking 30-45 minutes at bad times.
One thing to check when you arrive is what bit of T5 you arrive in, and where you go from. T5 actually has three buildings, linked by an underground shuttle train, T5A (the main bit), T5B and T5C. If you arrive at B or C gates, and depart again from B or C, you can clear flight connections and security there, which is generally a lot quieter. However, if either flight involves the main A gates, you'll have to do security there, which can have delays at busy times.
I've managed to find a CC-BY photo from Terminal 5 Insider which shows what you'd see at T5A:
This is at the far end of the Purple Flight Connections signs in T5A. To your right are the desks, where you'd go to collect your onward boarding pass if you didn't already have it. To the left is the UK border, which you'd have got to if you'd followed the yellow arrivals signs instead. Straight ahead is where they'll check your passport and scan your onwarding boarding pass, then it's up the escalators in the background to get to security. You need to get your boarding pass scanned by 35 minutes before departure (conformance), so with 2 hours you'll be fine!