All it does is scan the paper and when it sees white it transmits a '0' (or no pulse tone) and when it sees black it transmits a '1' (pulse tone). The receiving fax just reverses the process and prints white for '0' and black for '1' and - voila! - reproduces the original. The excellent Tim Hunkin did a tv show on this a few years back.
The telephone? It works by converting your voice into an electrical signal using a microphone. This then is sent to another phone that uses a speaker to convert the signal back.