Place your finger on any string, typically two frets or more away from the note you want to slide to. You can slide up or down. Strike the string with your pick. As you strike the string, move your finger either up or down (in the direction of the note you're sliding to). This is the slide.
Stop at the note you are sliding to, and bend the string by pushing it up against the fretboard. You can bend the string as far as you want (a half tone or whole tone). Hold the bend as you prepare to hammer out the next note.
Hammer the finger next to the finger you're using to bend (typically your index finger or your middle finger) down onto another fret. This is the hammer-on. As you hammer on to this note, release the bend quickly to minimize the effect of the release or slowly to emphasize the release.