A computer is an electronic device that accepts data as input, processes the data, and produces results as output which can be stored. It has four main functions: input, processing, output, and storage. A computer also contains hardware components like input/output devices, storage devices, and internal components. It runs programs and software to perform tasks.