You can join a new Team using a code by opening Microsoft Teams and clicking 'Join or create team'. This is usually found on the top right hand corner of the screen, or at the bottom of your Teams list found by selecting 'Teams' on the left side of the app.
Enter the Team code in the box, and click 'Join team':