=== What are hammer ons?? ===
Hammering something is hitting something hard. Similarly, 'hammer on' in guitar is a technique that involves hitting a string on a particular fret by your left hand (if you are a right handed guitarist). It produces the sound of the fret you hit hard.
=== Where is it used?? ===
Hammer ons are used in solos mainly but also for finger-picking and arpeggios. Hammer ons come in handy to make it easier for your playing/strumming/picking hand by producing the sound of a note using your left hand.
=== How is it shown in tabs?? ===
In tabs, hammer ons are usually shown by the letter 'h' accompanied by a number to the left and a number to the right.
For eg:
e-----|
B-7h8-|
G-----|
D-----|
A-----|
E-----|
Hammer ons are a very useful technique and produce a sound different from bends, slides and pull offs. But when played together, the sound really good.
Try this:
e-------------------5h8-|
B----------------5h8----|
G-------------5h7-------|
D---------5h7-----------|
A-----5h7---------------|
E-5h8-------------------|
That's the A minor pentatonic scale you just played using hammer ons.
You could also try this:
e-----0h2-----2h3-|
B---3-------3-----|
G-2-------2-------|
D-----------------|
A-----------------|
E-----------------|
Thank You!
personally when I teach I do both hammer-ons and pull-offs at the same time then teach them how to trill to practice the technique....
just my 2 cents, again this one is better than the sliding one.