I will talk only about intel architecture (amd use this arch as well )) ). First of all, processes are not being scheduled. Threads are basic unit of scheduling. In modern OS (like windows, macos or linux) each thread, what is going to be running, have a standard quant of time for it. In this interval of time, thread can also wait for something (IO, synchronization primitives) and this also lead to scheduling another thread on this CPU. Also if time quant is ended, scheduler start execution of another thread. Scheduler work with timer interrupt to acomplish this with resolution about several ms.
I've read that system calls (for example: requests to access filesystem) cause CPU to go back to kernel mode. However let's say that there is this code
Not only system calls lead to raise of current privelege level on current CPU. Also interrupts and exceptions lead to this. Besides, IA32 also have several not so used methods for this, like call gates, but this isn`t used in modern OSes.
What does cause that processor is switched back from user mode to kernel mode? Some timeouts?
As I say before, in general this is timer interrupts. Basically even in they time quant thread can switch beetwen user and kernel mode many times, on hardware interrupts, on software and hardware exceptions and service calls.