works because of the "reverse voltage", or EMF. the movement of the cone inwards and outwards, causing the VC to move back and forth between the magnetic field and creates a voltage. its the same principal as an electromagnet, except working the other way. the voltage that is created carries the same sound reproduction qualities as voltage carried from source equipment to the speaker.
microphones are actually nothing but very efficient, small speakers.