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. Damage heroes are typically played by the DPS role.
The Flex role on a team is usually filled by players that play Offtanks such as Zarya, Dva and Roadhog, as well as players that switch between these heroes and other characters often played by the DPS role.
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 players who play Mercy or Lucio, and a secondary support that can play the rest of the Support cast. The heroes typically played by the Support members of a team are all the Support heroes, Sombra and Builder heroes Torbjorn and Symmetra.