First off, let me walk you through the differences between all these three input that you can normally find on a mixer or speaker. What differs them is the signal intensity, what we call signal level. There are basically four types of signal level. Microphone signal has the weakest voltage, typically just a few ten-thousandths of a volt. But it will vary slightly when the speaking distance changes. What comes next is instrument level, which is what typically comes direct from a guitar or bass. The signal intensity increase prominently when it comes to a line-level, so-called 1 volt signal, which is about about 1,000 times as strong as a mic-level signal. There is an AUX level, which is near to line level, you can find on the AUX jack of some small Bluetooth speakers or computer sound cards. The very last one is speaker level. It has much higher voltage than line level and requires speaker cables for safe signal transfer.
And here are the procedures on how above five types of signal transfer, and therefore, what device and what jack you should plug a mic in. Microphone signal that travels through pre-amp, mic-to-line amplifiers or mixer(most commonly used) could become a line signal. So, if you want to input an analog microphone (except USB mics) to computer or speaker with only a line in jack, you will need one of those three devices. And plug the mic into the mic jack on them. Mis-connection will cause great harm to either audio quality or devices. Plugging a microphone directly to a line-level input will result in almost no sound at all because the mic signal is so weak that the line input cannot hear it. Connecting a line-level source (such as mixer output) to a mic-level input will cause the sound to be loud and distorted because the line signal is much stronger than what the mic input will accept.
As for an instrument, you could also use a DI box (Direct Injection or Direct Input) to take it to line level. The AUX signal is always unbalance. So microphones will not work properly or not even work at all if connected to an aux input.