1) GPIO (General Purpose Input/Output) is used to interact with basic peripherals like buttons, LEDs, and more complex components.
2) There are four GPIO registers that control it: IODIR sets pin direction (input/output), IOSET and IOCLR set pin states (high/low), and IOPIN reads current pin states.
3) For example, to turn on an LED (set pin low), first set the pin's direction to output using IODIR and then set it low using IOCLR. To turn it off (set pin high), use IOSET instead.