Most of us have an idea how our ear works. We have an eardrum, which is a diaphragm or membrane, and sound pressure moves this membrane back and forth stimulating nerves and generating electrical signals the brain can recognize as sound. Our brains act as recorders storing the sounds we hear for later comparison and reference. We even have the ability to reproduce those recorded sounds either through a mechanical device like a musical instrument or our own instrument - our voices - witness a singer hearing a song for the first time and then repeating it.
The same basic process happens in a microphone where we have a diaphragm that moves back and forth in response to sound pressure and a mechanism to convert that movement to electrical signals. In both cases, the eardrum and the microphone use a membrane as a lever to connect and stimulate the mechanisms that convert movement to electricity.
The first microphones ever built did not have this conversion process. Instead, the membrane/lever was used to move a needle that cut mechanical representations into a sheet of wax or foil and the playback process was an exact and reverse duplicate of the recording method. There was nothing electrical involved with the old Gramophones.
The chance for high fidelity recordings started only when inventors got closer to how our ears actually work with the membrane/lever/electrical conversion process - which is still used today.