At my pediatrician it varied quite a bit. When I was very young, the doctor would just pull down the front of my underwear or slip his hand inside without saying anything. As I got older, more dialog was included.
[laying down on the table]
Lift up for me? Good. [he tugs my underwear down] Cough for me? Harder. Harder. Again please. One more time and you're done. C'mon once more. Ok good.
[standing with the doctor behind me, he reaches into the front of my underwear]
So, how's school going?
[standing with the doctor seating in front of me]
Ok, go ahead and pull those down.
He then went into a detailed instruction on how to do a testicular self exam complete with a hand-out, then checked for a hernia.
[laying down on the table, he pulls the front of my underwear down as far as he can]
So, are you examining your testicles every month? Good. This is how you check them. Tighten up? Again? Ok.