How do speakers and headphones work?

Speakers use pulses of electricity to activate a small electromagnet that surrounds another magnet. it has a plastic covering, so as to mimic the vibration of our vocal chords and make noise.