While I frequently fantasize about snappy comebacks or bloody shoot-em-ups whenever I hear such comments, my reaction has always been No Reaction. I just act as if I didn't hear anything at all... no noise, even. It's a skill I honed in elementary school, to simply not react in any way. As Jasun pointed out above, they are seeking a reaction from me, either indignation or embarrassment, and I refuse to give such people what they want.
But once, the temptation to react almost overcame me. I was leaving a drag show in San Rafael, I was in a bit of a pissy mood, and as I was putting my bags in the trunk, some kid in front of Double Rainbow, clear in my peripheral vision, shouts out "Hey, Faggot!" He was a teenager, maybe sixteen or seventeen, tall but grossly overweight. Though I didn't turn to look at him, nor physically react in any way, I have excellent peripheral vision and could clearly see the sneer on his face.
Now most of the time, when I hear such comments, it's from a moving car or a group of five or more... never from one perfectly stationary kid all alone in front of an ice-cream shop. The novelty got right in amongst me.
"What do you want, Fatass?" was on the tip of my tongue, struggling to get out. I knew I could beat the crap out of him, especially since I had a tire-iron to hand (in my old Volvo, I never figured out how to get the tire-changing kit puzzled back into its little space under the trunk floor, so the jack and iron were always floating around the trunk); but although he was quite alone, there were far too many witnesses in the ice-cream shop and out on the street.
My habitual nonreaction won the day, I was back in my car and halfway to the bridge before the temptation to bait the kid and then attack him if necessary won over my usual mannered reserve. But I was steaming mad, and replayed the fantasy of baiting him and then taking a tire-iron to his head right in front of twenty witnesses all the way home.
The adrenaline rush of just imagining what I might do scared the hell out of me. All I can say is that kid was lucky as hell I have so much impulse control.