They can be used to perform 'trills'. A trill is the rapid succession of two notes. For example, if we placed our index finger on the 12 fret, 3rd string, and then sounded it, we'd get only one sound. But if we continuously hammered on to the 13 fret using our middle finger, and then immediately pulled off back to the 12 fret, we will get a continuous stream of notes, without even using the pick except for the first note. It is because pull offs generate vibrations that we are able to do this.
Trills are a good way of ornamenting notes.
Like we said, we can perform trills. With a lot of practice, we can learn to use hammer ons and pull offs with speed and accuracy, and with this skill, you can learn to play very fast. It's easier to hammer on and pull off to a note than it is to pick every note just as fast. We'll look at some of these uses of hammer ons and pull offs in further lessons. Hammer ons and pull offs are a means of using the left hand to sound notes with out using the right hand to sound them.