in order to translate an electrical signal into an audible sound, speakers contain an electromagnet: a metal coil which creates a magnetic field when an electric current flows through it. ... This means that it is in turn attracted to and repelled from the permanent magnet, vibrating back and forth.