Shift registers: add more digital I/O to your Arduino
Shift registers are useful chips that can add more outputs or inputs to your micro-controller. The 74HC595, for example, provides 8 additional digital outputs that can be controlled with only 3 Arduino pins. Additionally, you can “daisy-chain” multiple shift registers to multiply the number of outputs even further.
Below is a great video by Kevin Darrah explaining how shift registers actually work. He took an interesting approach demonstrating the functionality of the shift register using manual input via push buttons, rather than a micro-controller.
And for a more detailed write-up with Arduino sample code, check these articles from Nick Gammon on using a 74HC595 output shift register as a port-expander and (to get more inputs, rather than outputs) the 74HC165 input shift register. Another great resource is the tutorial on the 74HC595 8 bit shift register by bildr.