Microphones and great recordings

How are microphones used to make great recordings and what’s the difference in mastering engineers?