A computer is an electronic device that takes in data as input, processes it, and provides the output. It has two main components - hardware, which are the physical parts like input and output devices, and software, which are the instructions that control the hardware. A computer's functions include taking input from the user, processing operations on the data, storing the data, and displaying the output.