The eardrum (or tympanic membrane) works by taking in vibrations in the air, which causes the membrane itself to vibrate. These vibrations are transmitted through the three bones of the middle ear to the cochlea in the inner ear, which causes ripples in the fluids inside the cochlea which are registered as 'sounds'.
Hope that helped! =)