This is a relatively open ended question, and there can be many preferences between players. Regardless, you will want characters whose ultimates complement each other.
For example, Zarya works well with almost any character, as her Gravity Well creates easy targets for other ultimates, such as Pharah's Rocket Barrage, Junkrat's RIP-Tire, Tracer's Sticky Bomb, and Hanzo's Dragon Arrow, to name a few.
Team Composition goes beyond Ultimates though. In my experience, a Mercy running with a Roadhog, Junkrat, or Pharah, can be a deadly combination, as Mercy can stay behind to heal and provide her damage buff, which can greatly increase the potency of these characters on the map. A damage-buffed Roadhog is nothing to snort at.
I have also seen teamwork between a Mei and a Widowmaker, in which the Mei creates an ice wall under Widowmaker so she can see over a wall to shoot. It's quite useful on Volskaya Industries when assaulting the final control point.
Personally, a duo of myself as Zenyatta and my friend as Reinhardt is fantastic, as Zenyatta can heal behind Reinhardt's shield while also decimating targets with the Discord Orb.
Again, this is a very open ended question, and some maps/gamemodes are better suited for certain pairs of characters. However, thinking ahead about who your teammates are, who you plan on playing, etc., can really help with getting a balanced and complementary team.