The microcontroller is a controller that runs the code (software) you write. The controller is embedded in a chip and this chip is put on a PCB. A raspberry pi is a single board computer, It has all the interfaces (USB for input devices, HDMI out for video out and ethernet for connectivity) needed for a computer on one board (PCB). The microcontroller is in this case an ARM processor inside a chip from Broadcom on that raspberry pi board.
What are the differences between single board computer and microcontroller?