Sign out from the account menu in the header, or from the menu in the mobile navigation. The menu shows the email address of the account you are signed in to, so on a shared machine you can see which account you are about to sign out of.
Signing out revokes that session immediately. A revoked session cannot be resumed by pressing back.
If you have signed in somewhere you no longer control — a court library terminal, a colleague's laptop — go to Security in your account and sign out of other devices. That revokes every session except the one you are using.
Sessions are per device. Signing out on your phone does not sign you out on your desktop, which is deliberate.