It depends on the processor, but I will go with x86.
The processor does not understand the idea of ββthe process. This is an abstraction of the OS for switching the current code. The CPU understands the privileges of running the code on which it resides.
In the paging operating system, the OS code is displayed on pages marked as supervisor in the page table, while user mode code is marked as user mode in the page table. When the CPU accesses any memory location, in this case the current instruction via EIP, the processor searches for virtual memory. After this search, the processor scans the page table and can check the supervisor / user mode flag and interpret the current instruction in this way.
source share