The Linux kernel code runs on the CPU. Userspace applications also run on the CPU. A CPU capable of supporting Linux has the facility to partition the kernel code and data space from userspace code and data, and also to ensure that each userspace process is confined within boundaries prescribed by the OS (kernel). CPUs often include peripherals built onto the CPU silicon, and/or there are external peripheral chips. Accessing those is usually the domain of kernelspace code. The kernel provides a means of access to the peripherals by userspace code through device drivers. It is also possible to create userspace access to peripherals, commonly called userspace drivers. This always requires root privileges, and is commonly done as application-specific code, not intended for any kind of shared access by other applications. Some developers use it as a step in the learning process while developing a full and proper kernel mode driver for a particular peripheral device.
There are extensions to Linux that provide real-time functionality, but otherwise Linux is not a RTOS. It sounds like you may be familiar with something like vxWorks, which is a realtime OS, but does not use protected mode on the CPU, and therefore does not embody the concept of kernel-mode vs usermode. That is done for performance reasons, as the use of protected mode imposes some significant overhead in CPU cycles.