Accidentally entered the login window while working; is there another way to return to the regular desktop without typing in the password?

If you've accidentally switched to a different user, press ESC or click on Cancel to return to your desktop.

If instead you've landed in the login window, you need to select a user and type the password.