A hammer-on is a playing technique performed on a stringed instrument (especially on a fretted string instrument, such as a guitar) by sharply bringing a fretting-hand finger down on to the fingerboard behind a fret, causing a note to sound. This technique is the opposite of the pull-off.
Passages in which a large proportion of the notes are performed as hammer-ons and pull-offs instead of being plucked or picked in the usual fashion are known in classical terminology as legato phrases. The sound is smoother and more connected than in a normally picked phrase, due to the absence of the necessity to synchronize the plucking of one hand with the fingering on the fingerboard with the other hand; however, the resulting sounds are not as brightly audible, precisely due to the absence of the plucking of the string, the vibration of the string from an earlier plucking dying off.
The technique also facilitates very fast playing because the picking hand does not have to move at such a high speed, and coordination between the hands only has to be achieved at certain points. Multiple hammer-ons and pull-offs together are sometimes also referred to colloquially as "rolls", a reference to the fluid sound of the technique.
A hammer-on is usually represented in guitar tablature (especially that created by computer) by a letter h.
A rapid series of alternating hammer-ons and pull-offs between a single pair of notes is called a trill.
In the Banjo tutor book "Ellis's Thorough School For 5 String Banjo" published prior to 1900, the term 'Hammer on' is used to describe the action of performing an embellishment called 'the Shake'. The description is "The Shake, which is marked 'tr', is played in the following manner. Strike(pick) the first note only with the right hand & the remainder of the passage with the 2nd finger of the left hand, by 'hammering on' the string while it is vibrating". In the same tutor book, the action 'pull off' is termed the 'snap'. 
- Traum, Happy (1974). Bluegrass Guitar. Oak Publications. p. 25. ISBN 978-0-8256-0153-8.
- PBS Documentary Give Me the Banjo
- Erbsen, Wayne (2010). Southern Mountain Banjo. Mel Bay Publications. p. 24. ISBN 978-1-60974-047-4.
- Ellis, Herbert J. (1898). Ellis's Thorough School for the Five Stringed Banjo (PDF). J.A. Turner. Archived from the original (PDF) on 2008-05-11.