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, and Soldier: 76. Projectiles are characters with either ability reliance or a reliance on a weapon with bullet travel time, such as Genji, Pharah, and Junkrat. Both types of DPS, however, are primarily focused on dealing damage.
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 healing, and will likely have the most healing done. Depending on the composition, the Main Support could play characters such as Mercy, Lucio, Ana, 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.