"A computer is a general purpose device that can be programmed to carry out a set of arithmetic or logical operations" -Wikipedia
I will answer it simply. It is basically an electronic device made to store and process data, sometimes huge quantities. Computers are mostly used in hospitals, offices, homes, basically everywhere needs a computer. It is not necessarily related to mouse, keyboard and monitor and all those basic stuff. There are highly complexed computers used in hospitals and government offices to store huge amounts of data; mostly concerning important things.
You are using a computer right now, I hope. You can surf the web, browse photos and videos, play games and use softwares with your computer provided you have the correct peripherals. The function of computers is just to broad to cover completely.
I hope that gives you a brief idea of what a computer is :)