To do so, first attempt to bolster the dog's confidence by starting and maintaining basic obedience training. Doing so will help the dog understand what is expected of him at any given moment, a great way to relieve his stress.
Also, by teaching the dog the meaning of the word "No," you will be able to stop the licking with that one word. Training will also enable you to give the dog an alternative behavior ("Sit" or "Down") once the licking has been stopped with a "No."
In addition to training, you can use a bitter-tasting, dog-safe product to help deter the behavior. If your dog is in the habit of coming over and licking at your hand, try spraying a "Bitter Apple" liquid onto your hand.
Then, leave your treated hand hanging down and let the dog lick; when he tastes the bitter substance, he will get the message.
If your dog is a real lick monster, you can use a stronger substance such as petroleum jelly infused with some cayenne pepper.
Compulsive lickers often respond well when provided with safe chew toys on a regular basis. Doing so will redirect their oral fixations and calm them down.
By combining training, bad-tasting substances, and safe chew toys, you should be able to minimize your dog's annoying licking habit. Just be aware that the licker is a submissive, easily-frightened pet who should be treated gently.
Yelling or hitting will just make the problem worse, so easy does it.