Choose from the menu. If you have trouble understanding any of this pick the first option.
Use a processor with enough pins.
Use shift registers, 74hc595s work well. 3 pins per register chain. With some work you can get that down to 2 pins.
Buy a IC designed to do the work. Depends on the interface, SPI will be 3 pins.
