I dont typically run into hecklers, but there were a couple that got kind of bad. The big catch with a heckler is that if they are really there just to make your day miserable, you must turn the rest of the audience against them. Then once that happens, confront them. Ask them if they are only there to be a jerk and one of two things will happen, 1. they will back down, or 2. they will get defensive and mad, if that happens, either move the crowd from them or stop performing until they leave. Many times the crowd will take care of a hardcore heckler for you.
of course, that's for the bad heckler and that strategy should only be used in extreme circumstances, to show him you aren't going to be pushed around.
On the other hand, if the person is good natured but still heckling you...well... many people are naturally hecklers because they think that's their job when watching magic, to try to make it difficult and figure it out. They think its a contest of wits (which it in reality is, but you dont want them to feel like that). When those people come along I would suggest you perform a couple of strong, foolproof effects you know you can pull off, and if they dont lighten up and relax, you can just explain to them that the point isn't to figure it out, but you probably dont want to be using them for assistants (picking cards etc.)