Basically, use standard D&D combat rules, but consolidate the initiative, actions, movement, attack rolls, AC, and saving throws for multiple identical creatures working together. Also consolidate HP, damage, and ability checks, but multiply them by the number of creatures participating.
Example:
Who would win—100 orcs or 5 young red dragons?
Unit 1: 100 orcs (15 x 100 = 1500 HP)
Unit 2: 5 dragons (178 x 5 = 890 HP)
Orcs win initiative and the sky goes dark as a flurry of javelins (+5 to hit) is hurled at the dragons. The orcs roll a 13, high enough to hit the dragons' 18 AC. They do 6 (1d6+3) x 100 = 600 damage to the dragons.
The dragons are dropped to 290 HP, meaning that only two remain, one of them injured (290/178 = 1.6).
Next the dragons spray the orcs with their fire breath—two 30' cones.
This is an area effect, so there are a couple of ways to handle this. The simpler option is to apply the attack to the entire unit and use the adjudication guidelines on DMG page 249 (30' ÷ 10 = 3 targets per cone) to assess the multiplier for the area damage. The whole unit makes one DC 17 Dexterity saving throw, and assuming they fail, the unit takes 56 (16d6) fire damage x 3 targets per cone, x 2 dragons in the unit, for a total of 336 fire damage, leaving the orcs at 1164 HP (78 orcs remaining).
Another alternative would be to map this on the battlefield, or do the math (30' x 30' ÷ 2 = 450 square feet = 18 5' x 5' spaces per cone), to estimate what fraction of the unit is hit. Let's assume that since the orcs are tightly packed in formation, we'll hit the maximum of 18 orcs per cone, for a total of 36 orcs. We then temporarily split those orcs into their own 540 HP unit. Whether they make their saving throw or not, they will be completely obliterated by the 2016 fire damage (56 x 18 x 2). That leaves a 960 HP unit of 64 orcs untouched by the fire. Let's say we do this.
The orcs attempt a melee attack, but fail to hit the 18 AC of the dragons.
The dragons then retaliate with a bite/claw/claw multiattack, hitting each time for a total of 92 damage (17+3 for the bite and 13 for each claw, x 2 dragons), reducing the orcs to 868 HP (58 orcs).
The 58 remaining orcs swarm the dragons and hack at them with their greataxes, doing 522 damage (9 x 58) and felling the beasts once and for all. (Let's take a moment to thank the dragons for staying on the ground to make this example easier.)