How the telephone works
The telephone combined the knowledge of how sound works together with a variable electric signal that could be sent over great distances.
Instead of the telegraph's simple electrical pulse - on or off - the telephone uses an electrical signal that changes in amplitude (volume) and frequency (pitch) across time - in other words, a 'continuously varying signal'.
This is more like real life, and means that the telephone is able to carry a human voice. But for the scientists of the day it required a better understanding of electricity as well as technological progress in the areas of cables and switches.
Sound : good vibrations
The sound waves that you hear are quite simply movements or vibrations of air. These sound waves travel through air, like the wind, by changes in air pressure.
Different sounds come about because the air vibrates at different frequencies. And as the trailer for the film 'Alien' made clear - 'in space, no-one can hear you scream ...' - sound can't travel in a vacuum because there's no air.
The substance that a sound wave travels through is called its 'transmission medium'. Sound waves can, in fact, travel through almost any medium, such as water or the bricks in your house, and in many cases much further than in air. Whale songs can travel for hundreds of miles underwater, although you'd need special equipment to listen to them if you were more than about 10 miles away.