Creating and joining teams is a very straightforward process. The first step is creating the team. Press TAB to open your inventory, and click "Create Team" in the bottom left corner.
After creating the team, approach your teammate and press E to invite them to the team.
After inviting your teammate, have them open their TAB menu to accept the invite in the bottom left corner.
In conclusion, you should now see your teammate on the map, as well as in the bottom left corner of your screen.
For further information about teams, please visit the Official Facepunch Documentation.