What is the difference between user mode and kernel mode, and how does a system call transition between them?