As others have said, not enough information. The method will be different depending on the specifications of the components used.
Generally:
The CPU can directly drive the LED anode with a current limiting resistor depending on the CPU pin current spec and overall CPU current spec.
There are instances where the CPU can sink more current than it can drive. In these cases, the CPU can directly sink the LED cathode with a current limiting resistor depending on the CPU pin current spec and overall CPU current spec.
The CPU can drive a ULN2803 (or equivalent) 8 channel transistor array which can sink the LED cathode with a current limiting resistor.
You can use port expanders, shift registers, etc. but those would still fall under the same rules as directly driving with the CPU.
More info would make it easier to answer.