A microphone converts vibrations in the air to a weak electrical signal.
Most microphones use a membrane to absorb the vibrations in the air. The conversion to an electrical signal is done in various ways, such as with a coil inside a magnet (= dynamic microphone), with a capacitor and a resistor (= condenser microphone) or via a strip of aluminum between two magnets (= ribbon microphone), etc. Microphones are a number of matters of importance, namely the frequency characteristic (ie how are the frequencies translated) but also the sensitivity of the microphone in a certain direction. For example, we have a kidney characteristic that is very sensitive at the front, less to the side and absorbs no vibrations at the back. With a figure-8 characteristic, we have a high sensitivity at the front and back, but not on the sides.