The kernel is ultimately responsible for all of these things.
(Which is one of the many reasons why the kernel is "a slightly-complicated computer program" ...)
When a process "voluntarily goes to sleep," from the kernel's point-of-view that process has
(a) given up the remainder of its current time-slice, and
(b) voluntarily designated itself as "asleep, therefore non-dispatchable." Therefore, the CPU/core that had been running this process will move along to other-things, and all other CPUs will decline to run it.
(Maybe the swapper "picks this particular process to be its next victim," or maybe it doesn't. This doesn't affect the process's "basic runnability," although a swap-out might
delay things a bit ...)
Anyhow: eventually, a signal arrives. (Could be an alarm, could be something else.) The process, as a result, switches from "not-runnable" to "runnable." (Or, if it's swapped-out,
"soon to be runnable, and by-the-way needs to be swapped back in.")
Yeah, the kernel gets real complicated, real fast.
But ... lo and behold ...
if the process had been swapped-out, very soon it gets swapped back in. Then, it re-enters the "run-list." Shortly thereafter, some CPU picks it up.
... and the user
(and, the application programmer) "is none the wiser."