Why do electrical devices energized with alternating current make sound? I was recently trying to study, when I became aware that a nearby fluorescent bulb was humming. Because of this, I began thinking about sound from electrical components. In the past I've assembled crystal radios from those "snap together" kits, and I once connected a DC motor in place of the speaker in the name of experimentation. The motor functioned surprisingly well as a quiet speaker.
They may be due to different principles, but why would a plain DC motor function as a speaker, and why do florescent bulbs hum?
 A: You know that sound are mechanical waves that propagate through the air (or solids or liquid, but the sound that we hear reaches our ears through the air). 
On the other hand, any object immersed in air that moves will move the air around it in a manner that is related to its own movement. This movement of air is nothing else than sound waves (you may not hear them if they are at low frequencies or low intensity, but they exist). So if you manage to move any object that is immersed in air in a certain way, you will produce sound.
In the case of the fluorescent tubes the "object immersed in air" is the ballast that is present in every (old) tube, and the force that makes it move to produce a 50 or 60 Hz sound is due to the magnetic field it creates because of the alternating current flowing through it. This alternating current, as its name suggests, alternates at a frequency of 50 or 60 Hz (in most countries) so the resulting "movement of the object immersed in air" has this same frequency, and so does the sound produced.If you have a piano you can check the note of the sound. It should be near a G for a 50 Hz country and near a B for a 60 Hz country.
For the case of a speaker, the "object immersed in sound" is the cone of the speaker and it is specially designed to obtain the greatest possible movement using the lowest possible electrical signal (well, this is not the only thing that we want in a speaker, but roughly speaking it is). In this case the force that moves the cone of the speaker is, again, due to a magnetic field produced by the coil inside the speaker.
If you replace the speaker with a DC motor, the rotor will be the "object immersed in air" and will feel a force in the same way as the speaker, due to the magnetic field produced by the coils of the motor. It will not spin because the audio signal of the radio has no DC component, and you wont be able to see it moving because it will surely a very small movement. But it will move enough to produce a sound (probably with much less intensity that the speaker).
A: Many AC powered devices use magnetics---coils of wire wrapped around iron cores.  Electric motors, anything with a transformer in it, magnetic ballasts in HID light fixtures and older fluorescent light fixtures, etc.
All of the above can produce noise at some multiple of the power line frequency via magnetostriction.
