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, Orisa and Wrecking Ball. These characters take control of space that their team can use to win a team fight. They do this by forcing the enemy teams attention on themselves by more or less agressive means. This can be either diving the enemy team by jumping onto their back line (Winston), by occupying an area with a shield (Orisa), by advancing onto enemies with high close range damage (Reinhardt) or by displacing and poking at the enemies (Wrecking Ball). 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 providing non cooldown utility, such as speed or damage boost, 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 is more mechanically demanding and focuses on things such as dealing damage and cool-down based utility, such as anti-nade or discord orb. 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.