Modern operating systems allow more than one user account to be logged in on the same computer at the same time, and this affects whether a running application keeps running or is shut down.
When a user is switched, the operating system suspends the current user's session in the background rather than closing it, any applications that user had open keep running and retain their state, ready to be resumed the moment that user switches back, while a different user logs in and works separately in the foreground.
Logging off, shutting down, and rebooting all end the current session, or the entire system, completely, which closes running applications rather than leaving them active, because in each of those cases the operating system tears down the session or powers the machine off rather than keeping it suspended in the background.
Exam tip: remember that switching users preserves a session in the background, while log off, shut down, and reboot all end sessions and close running applications.