In daily life, we see too many types of computers. We use desktops on table, laptop on knee and tablet computers everywhere. Also in last years, mobile phones began to smartphones and having operating systems. You can do almost everything with them that you do in computers. But if we look into the theory we do not need an operating system, touchscreens, monitors and keyboards for making a computer. A computer system is forming with a processor unit and memory. If you have a system that contains a central processing unit and memory, you have a computer. So there are dozens of different computer systems in the world because of it, not only desktops or PCs.
If we look into a microcontroller we see a CPU and memory. The type of memory depends on the microcontroller series. Some of them contain only RAM and almost most of them contain RAM (Data) and ROM (Program) both. Microcontrollers run a program that downloaded into their memory after boot, like computers. Also, we can see mutual points in system clock and peripherals. PCs have a system clock that runs computer and peripherals that interacts us. For example, we have a keyboard, mouse, monitor and USB ports in PC. In microcontroller maybe we don’t have a keyboard or monitor but we have Analog-Digital Converters, Digital-Analog Converters, timers, serial communications, and LCD drivers. And all of them are embedded in silicon chip with CPU and memory. So if you buy a microcontroller you get a computer with memory and peripherals just in a tiny plastic package. Also if you write driver software you can connect keyboard, mouse and other peripherals too.
In summary, both devices contain the Central processing unit (CPU), Memory, System clock and peripherals. Microcontrollers may be slower, smaller and have little capacity of memory but we can say that they are absolutely a computer.