Microcontrollers are effectively a 'computer' on a single chip that contains a CPU, memory and programmable inputs/outputs (1). Consequentially, this provides an economical solution in the DIY situation to relatively easily digitally control a wide variety of devices and produce solutions to myriad problems, that a more traditional 'analog electronics' approach would require extensive electrical engineering knowledge and skill.
Various microcontroller families (PIC, ARM, AVR, etc) typically have onboard functionality such as analog-to-digital converters (ADC), Pulse Width Modulation (PWM), programmable timers, voltage comparators and general purpose input/output pins (GPIO) which with programming via EEPROM and flash enable sophisticated solutions with only relatively simple external ancillary circuitry. Such minimum external circuitry typically involves a suitable power supply, perhaps an oscillator and connections for the programming of the microcontroller.
While many applications require a "myriad" of GPIO's for controlling various outside peripherals and or input from sensors (and hence need "larger" microcontrollers with multiple ports), in the DIY arena there are also many occasions where there are only a couple of inputs/outputs required to be controlled. In this scenario the ATtiny range of microcontrollers are advantageous in terms of physical size and cost per GPIO/onboard peripheral available. Particularly when considering that an ATtiny85 on a Digispark "development" board can be purchased from ebay for ~$1 (which provides a surface mounted ATtiny85 with 5V regulator and PCB tracks to enable insertion into a USB socket). The ATtiny85/Digispark coupled with the Arduino IDE for programming enables "simple" projects to be developed quickly and easily deployed for a few dollars in total.
Details on how to setup the Arduino IDE and environment to programme ATtiny85 microcontrollers are given in the ATtiny85 introduction. This information is used to demonstrate the practical implementation of programming an ATtiny85/Digispark to blink a series of LED's (the microcontroller circuit analogous to the 'hello world' application of the 'programming world').