A microcontroller is a controller that runs the software code you write. You compile the code and run it on the controller embedded in a chip. This chip chip is put on a PCB.
A raspberry pi is a single board computer. It is based on an ARM CPU. So, the software you write is compiled for the ARM CPU inside the chip. The board itself has all the interfaces you need to connect keyboard, mouse and monitor (USB for input devices, HDMI out for video out and ethernet for connectivity). It is in fact, as the term says, one board that is a computer. Desktops are usually a motherboard with a case, hard disk drives, a DVD maybe, a GPU and a lot more. With the rapsberry pi, a small board is everything you need. Of course, you need an SD card for the OS. But in principle, it is a thin client desktop. And the microcontroller is inside.
I am a big fan of these small affordable boards. The Arduino is great for SPI, I2C communication and for my 3D printers. I use the raspberry pi mianly in home automation and as thin client.
Quora space : HW accelerators eating AI