Any fret on any string. Pluck the note, and then tap your middle finger down sharply on the same string a fret or two up from the first fretted note. There—you've now sounded two notes even though you only plucked the string once. You've done a hammer-on.
Why can't I hammer-on guitar?
https://www.youtube.com/watch?v=rdXJzQFedxg
How do you hammer and pull-off on a guitar?
https://www.youtube.com/watch?v=_iV_qyqgTwI
Can you pull off on an acoustic guitar?
https://www.youtube.com/watch?v=m2OOuJivbSQ
Are hammer-ons easier on electric guitar?
This musical seesawing can in theory go on indefinitely, as long as you can keep up sustain and volume (easier on electric guitar than acoustic) A rapid such series of hammer-ons and pull-offs between a single pair of notes is called a trill.