The updated quickplay matchmaking roles are described here. The names I'm using aren't official.
Healer - The game tries to prevent 1-2 healers teams from going up against 0 healer team. Any "Support" hero that isn't in the Sustain group goes in this group.
Sustain - Again, the game tries to mirror the amount of Sustain heroes on each side. The heroes in this group are Abathur, Tyrande, Tassadar, Zarya and Medivh.
Tank - Also mirrored. Contains all warriors except Zarya, D.Va and Sonya. Currently includes Varian, but I think this has been changed twice already, and might change again.
Bruiser - Not mirrored. Might not do anything actually. Includes Sonya, D.Va, Ragnaros and Thrall. Ref
Stealth - Not mirrored. Teams are limited to one stealth character each, to prevent Nova/Zeratul/Valeera as your three dps. Also includes Samuro. There's a theory that Genji is also included in this, but this hasn't been confirmed.
The older rules which may or may not be still be effect are described here
No more than 3 Warriors.
No more than 4 Assassins.
No more than 2 Support.
No more than 2 Specialists.
No more than 3 Melee heroes.
I don't have details about how these two sets of rules interact with each other, or how the older ruleset might have been updated.