A computer is a programmable machine that can execute a list of prerecorded instructions. It has two main components - hardware and software. Hardware refers to the physical parts like processors, memory, storage devices, and peripherals. Software includes operating systems and programs that make the computer functional. Key hardware components include the CPU for processing, RAM for temporary memory, ROM for startup programs, hard disks for permanent storage, and peripherals like keyboards, printers and displays. Software is made up of programs and operating systems that control the hardware and allow it to perform tasks. The most important software is the operating system, which manages the computer's basic functions and allows other programs to run.