Here's a good article from the Rock House ask the teacher section.
This technique is also often called a less technical name "two hand tapping". Eddie Van Halen made this technique famous for guitar with his solo on "Eruption" from the album Van Halen 1 .
This technique is done by playing a series of hammer ons with both hands tapping on the guitar neck. I’ll give you a specific example so you can get started with this quickly.
1. Hold your first finger down on the fifth fret of the second string.
2. With your right and index finger, hammer down the note on the 12th fret of the same second string. This will sound your first note.
3. Next, snap or pull off your right hand index finger from the note on the twelfth fret and this will sound the note that you were holding down on the fifth fret with your left hand.
4. Now hammer down your left hand fourth finger on the eighth fret of the second string.
5. Keep repeating this three-note pattern 12-5-8 over and over building up speed gradually; remember that your right hand taps on the twelfth fret and your left hand covers the fifth and eighth fret notes.
6. *Quick Tip* Make sure that you hold down your fourth finger at the end of the sequence until your right-hand tap on the twelfth.Experiment with many different variations of this technique using different frets, strings, and patterns and you will find many great sounds.