It depends on the printer.
If the printer supports PostScript, the application/driver can send the colour data in just about any colour format you like: RGB, CMYK, indexed colour, greyscale, etc. The printer will convert it into CMYK, adjusted for the particular inks/toners used in the printer. The adjustment is done with internal colour tables that adjust not only for the actual ink colours, but also for various perceptional models. The printer also adjusts the resolution so you can, for example, send the printer a 100dpi image and print it at 300dpi. All up, this makes PostScript the preferred way to print colour.
PCL5 and PCL6 printers can use RGB, CMYK and greyscale colour models. The printer does the conversion to ink dots on the paper. Colour adjustments are very limited in PCL and are mostly done in the driver.
GDI printers (also called host-based, and various other names) are different. These low-cost printers depend on the operating system's graphics engine to convert the page into dots on the paper. With GDI the internal colour system is always RGB and adjustments are done by the OS. GDI can send either RGB or CMYK data to the printer. In the case of RGB, that implies that the printer will do the conversion. Many GDI printers do not have any built-in colour adjustments, so that has to be done in the OS.