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...
There is a DIP ATMega328P version and in fact it's the one used on the Arduino UNO. It's also socketed! You can program it on the UNO, take it off, and it's good to go to be plugged into a breadboard, soldered standalone on perfboard, etc. and replaced with a new one.