If you are talking about rivals servers yes you can leave teams by going to /warp teams. But to join a different team will cost 50000. Unless you contribute alot of points to a team (hatch eggs, catch shinies, catch legendaries etc), being on a specific team doesn't really matter as all teams have the same team missions, they all have access to team mines.