Like a pull-off, a guitar hammer-on is a type of slur, a smooth transition between notes. It allows you to play two or more notes on the same string with a single pluck. As opposed to a pull-off, the first note on a hammer-on is always lower pitched than the next one.

To play a hammer-on, first pluck the string with your finger pressed on the first fret you want played, than slam another finger on the next note to be played.

On a guitar tablature, hammer-ons are marked by the letter “h” or by an arc. For example, the following tablature instructs you to hold the second fret while picking the first string (low-pitch E) and then hammering-on the 3rd fret.
E||-2h3---
B||-------
G||-------
D||-------
A||-------
E||-------

You can watch the above example demonstrated in this video: