If it is on the internet I would say the easiest thing is to just politely decline or just ignore them.
If its in person then it pretty much goes the same, just politely decline. I approached a young woman in public before and she screamed at me, a girl with her friends and they both just laughed at me, approached another girl when I was 19 and had her start up a bunch of stupid rumours about me etc. Just realize that you are talking to a person who actually went out of his way to try to make a connection with you and how being rude to them is completely unnecessary, unless of course they say something to encourage that. Personally, I have a huge fear of rejection, but when it happens in such a negative way it usually makes me extremely angry and frustrated but I am able to turn that energy into something more constructive.