Hardware and software work together to allow computers to process and store data. The hardware components include the motherboard, CPU, memory, storage devices, ports and expansion cards. The motherboard contains the CPU and connections for other components to communicate. Software provides instructions to control the hardware.