What exactly does a microcontroller do?

I'm very new to electronics and how they work, and I was confused as to what a microcontroller was and what they did, and what they were used for.

thanks.
6 answers 6