To change your name, you simply need to tap on your profile picture on the top left of your screen to access your profile, and then tap on your picture one more time. The popup shown after this will allow you to change your name, and you can even choose a different profile avatar from the same screen!
Please note that your in-game name can only be changed once, every 30-day period, you will not be able to change your name until this time is up. There are also only specific letters and characters that are compatible with the game.
If you want to change your team's name, please make sure you are the team's owner. If you are not, you can always ask the actual owner to consider changing the name.