Context Switch in C in 32-Bit MCU
Under an RTOS, a context switch means the RTOS
changes which task (process) is currently running on MCU. The switch to another task may happen due to user code (e.g. OS call to sleep for some amount of time) or via timer interrupt if a task is running and time slice it was given is used so it is time to run other tasks. Or a task says to OS it is done and next task can run if user calls yield().
The context switch is done by OS code, you don't need to worry about it. Just like coding under Windows or Linux, the CPU cores are switched between tasks automatically by the kernel, and your plain old single threas C program does not need to be aware of it.