Team Roles are the roles each player plays in a team. They are separate from the categories that Heroes are split into in-game.
The DPS roles are usually filled by heroes that deal the most damage. They can be split into two kinds, hitscan and projectile. Hitscan characters are heavily reliant on their primary weapons that have no bullet travel time, such as McCree, Widowmaker, Soldier: 76 and Ashe. Projectiles are characters with either ability reliance or reliance on a weapon with bullet travel time, such as Genji, Pharah, Junkrat and Echo. Both types of DPS, however, are primarily focused on dealing damage, with an exception being Sombra, who instead focuses on enabling their team by disabling the enemy team.
The Tank role on a team is filled by the player that is playing the Main Tank or Offtank in the composition. Typically Main Tank heroes are thought to be Reinhardt, Winston and Orisa. In certain cases, Wrecking Ball is also played as a Main Tank, such as in dive compositions. These characters typically have large health pools to soak up damage, and a shield that they place or hold that blocks damage and creates space for the rest of the team. The Offtank role on a team is usually filled by players that play tank characters that are not specified as Main Tanks, such as Zarya, Dva, Roadhog, and Sigma. These characters are typically paired with Main Tanks, and generally do more damage and support the Main Tank with their abilities. They are also useful for peeling for their team, or helping a teammate who is under pressure, with their abilities.
The Support role is played by people playing characters that can heal other players (or support them in other ways). Historically, the Support role has been split into Main Support and Flex Support. The definition of these two roles has changed over time, and is hard to define indefinitely. Generally, however, the Main Support is a character who focuses on less mechanically demmanding jobs, and will likely have the most healing done. Depending on the composition, the Main Support could play characters such as Mercy, Lucio, Brigitte, and even Baptiste. The Flex Support, on the other hand, generally outputs less healing and has focuses in other areas, such as damage. Depending on the composition, the Flex Support could play characters such as Zenyatta, Ana, and Moira. These terms are loose and characters might define as a Main Support in one composition, and a Flex Support in another for example, Baptiste can be considered a Flex Support in a Mercy Baptiste support line but considered a main support in a Zenyattta Baptiste support line.