A computer consists of both hardware and software. The hardware includes input devices like keyboards and mice, the central processing unit (CPU) which contains the arithmetic logic unit (ALU) and control unit, primary memory like RAM and ROM, secondary memory like hard drives for permanent storage, and output devices like monitors and printers. Software includes system software that controls the hardware and application software for specific tasks. Computers process data by accepting input, processing it according to instructions, producing output, and storing information.