Sound is a series of vibrations of the air. When these vibrations hit the diaphragm of a microphone they induce a tiny electric current (without going deeper into electronics) which is amplified by the circuit of the tape recorder. The fluctuations of this electric signal follow the pattern of the original sound wave.
If this signal is fed through a circuit designed to drive a speaker, the speaker will vibrate in the same way as the original sound, causing an air disturbance which recreates the original sound.
If the voltage is sent to a tape head, it causes varying magnetism to be recorded on a tape which also follows the varying levels of the original sound, but there is no sound recorded on the tape. It is just a pattern which represents the sound.
When the process is reversed, the magnetic pattern causes an electric current in the tape player which follows the fluctuations of the original sound to be generated, and this can be fed back to the speakers, where it again recreates the original sound.
Difficult to explain, but it works!