Microphones are used for two different purposes:
1. To amplify the instrument's volume, like in a live performance at a noisy place, in a big hall or outdoor performance.
2. or to record.
Different types will be needed depending on their purpose or location.
If you would like to know more about it follow this link Microphone guide