In Windows, macOS, or a web browser instance of Teams, select your profile picture at the top of the app and then select Sign out.
You can sign in again using the same account or a different one.