The CPU is the central processing unit that executes programs with logical and mathematical accuracy. Memory, such as RAM and ROM, allows temporary and permanent storage of data. Expansion cards can enhance the computer's capabilities by adding features like additional USB ports or memory. Storage devices like hard drives and solid state drives hold files and programs. Input devices like keyboards allow data entry while output devices like printers allow the output of data from the computer.