A computer is a device that executes arithmetic and logical operations through programmed instructions, utilized in various applications from simple machines to complex systems like the internet. It consists of four main parts: input devices (like keyboards and mice), processing units (CPU), storage devices (such as hard drives and pen drives), and output devices (like monitors and printers). The CPU is the core component that performs calculations, while different storage types manage data temporarily or permanently.