Touchdowns follow the same rules in flag football as they do in the NFL, college, and high school football. It is the main way teams can score in flag football, and also has the highest point value for scoring.
In order to score a touchdown in flag football a player must cross the goal line and get into the end zone with possession of the football. The end zone is 10 yards deep and 40 yards wide. Players can either catch the ball inside of the end zone or carry the ball over the goal line. As long as the player with the ball remains within the boundaries of the field and breaks the plane of the goal line, then the play is a touchdown.
Different leagues actually have different ways of dealing with this. A popular format is that a try from the 3 yard line is worth 1 point and a try from the 10 yard line is worth 2 points. Some variations of the game even allow for a three point try, which would take place from the 20 yard line.