Sound is produced from a speaker by sending a varying signal to the voice coil causing it to vibrate. The signal comes in the form of a voltage that is switching back and forth between positive and a negative hundreds to thousands of times per second. The signal voltage induces a current in the voice coil, creating an electromagnetic field, with a North and a South pole. When the voltage, and thereby current, is switched so will the magnetic poles. The magnet attached to the frame is a permanent magnet with a constant magnetic field. When the magnetism of the voice coil and permanent magnet are alike the voice coil will be repelled, and when the fields are different the voice coil will be attracted to the permanent magnet. Because the voltage alternates many times per second the voice coil will move up and down very rapidly. The upward and downward movement of the voice coil makes the speakers cone vibrate, thus causing the surrounding air molecules to vibrate which we hear as sound.