1) Noise blocking with headphones uses absorption. This is aided by the use of foams. They absorb echoes to reduce background noise by controlling the vibration that sound causes when it bounces off a surface. The foam as an absorber does not controld noise but improves acoustics which reduces external noise.
2) Noise cancelling involves two waves that cancel each other out and this phenomenon is called destructive interference. The two waves involved are the one coming from the head phone and the one associated with the external sound or noise. They are both sound waves and are being transmitted. The waves have the same amplitude and frequency but their troughs and crests are arranged in such a way that the trough of one wave lines up with the crest of the other and vice versa. This would cause the two waves to cancel hence, destructive interference occurs. This would cause the listener to focus on the sound he wants to hear. This effect is achieved with the aid of microphones, noise cancelling circuitry, speaker, battery.