Private teams can only be joined if the team owner adds someone to them. When creating a team, choose to make the team discoverable so that people can search for it in the teams gallery, or turn discoverability off so that people can only find the team if shared by you or a team member.
Public teams are visible to everyone from the teams gallery and you can join them without getting approval from the team owner.
Change a team's privacy status
To change the privacy settings for your team from public to private (or vice versa), go to the team name and select More options > Edit team toward the bottom of the menu. Under Privacy, select either Public or Private.
To change a team's privacy settings, go to the desktop or web app.