A computer is an electronic device that can receive, store, process, and output data. It can perform a variety of tasks based on instructions given to it, and it consists of hardware components such as a central processing unit (CPU), memory, storage, input devices (like a keyboard and mouse), and output devices (like a monitor).