For your $2, you get:
* An internal oscillator which lets you run without an external clock circuit (typically limited to around 8MHz, and can cause clock drift, so not good of accurate timing is important).
* Hardware UART interfacing logic
* Hardware SPI interfacing logic
* Hardware I2C interfacing logic
* Several ADCs
* 23 GPIOs
* 2kB data memory
* 1kB EEPROM
* 32kb flash memroy
There are other microcontrollers out there, each with their own trade-offs. I personally like AVRs, as they have good quality open source compilers, you can mooch off the Arduino community for libraries[3], and in-circuit programmers can be had for cheap[1].
If you want to learn more, I suggest this article[2].
0 - https://www.mouser.com/ProductDetail/Microchip-Technology-At...
1 - https://www.adafruit.com/product/46
2 - https://www.evilmadscientist.com/2007/using-avr-microcontrol...