The two main parts of a computer are the hardware and the software. Hardware refers to the physical components of the computer, such as the processor, memory, storage devices, and input/output devices. Software, on the other hand, refers to the programs and applications that run on the computer and allow it to perform specific tasks.