Always consider what faces the players.
You're the GM, you can narrate as much as you want about whatever you want, but that doesn't matter. Not nearly as much as the things you put out for players to interact with.
Whenever you're describing action, whether it's war or weather or spectacle or stillness, always be thinking of the ways the players have to interact with it.
Of course, it may also be that you're at a loss for what kind of action is going to go down here. I mean, are the bandits going to fear for their lives and retreat to the forest? See an opportunity and break off to start looting the town? Grin, reveal the hidden tattooed symbol of the orcs' dark god, and now the PCs are fighting on two fronts? So let's talk about
Step 0: if necessary, stall for time.
If something significant happens during play that you weren't expecting, such as PCs drawing two factions of enemies together that you'd never thought about meeting, don't be afraid to ask for some time to think while your players take a water break or whatever. Set a timer for five or ten minutes to give your players a clear explanation, and then you can start thinking.
But before your break, ask the players "so, what's your plan here?" They may have a course of action in mind, or just want to roll Discern Realities to try and work out what kind of a mess they've created. You don't have to answer their Discern Realities questions until your break's over, but even asking them in the first place will let you know what the players are interested in learning from you. Nothing like taking a break only to find you've thought about a bunch of things that don't matter.
Always consider what faces the players.
Step 1: Consider motivations.
It's not like every free-willed creature in the world senses the PCs' protagonism and is immediately jealous, trying to kill them to claim it for themselves. PCs get in fights, and things fight PCs, for reasons beyond just wanting to see the other side dead. Answering the question of what happens when they meet starts with thinking about what motivates them.
Like, if the orcs want to destroy the town because sunlovers are blighting their land, and bandits want to rob the town, then they'll probably want to get in and get out with something valuable before the orcs destroy it.
But if you've mulled it over for a bit and nothing immediate is coming to mind about motivations, that's fine. For that case it's useful to have some kind of random oracle on hand - I generally keep a deck of tarot cards for the purpose - and the one oracle I certainly hope you've got is The Die Of Fate, the humble d6. Ask a question, get an answer, with "very no" at 1 and "very yes" at 6. (If you find yourself wishing the Die of Fate would land on a certain number, that's your answer.) So, for instance, if you're wondering if the orcs and bandits would fight each other and roll a 1, it's probably hidden-tattoos-of-a-dark-god time.
So now you've got your idea about motivations, about what might be a big pitched battle but could just as readily be the PCs getting attacked by one group while the other one tries to do something just as detrimental that needs stopping. Cool. How are the PCs going to interact with it?
Always consider what faces the players.
Step 2: The plot is real. "Your turn" is not.
As long as you're dealing with two forces which were individually reasonable for the PCs to confront, a big battle is a possible thing, and "these two monsters deal their damage to each other" is certainly something that can happen during it.
But you're always passing the spotlight around the PCs, telling them about the threats and opportunities in front of them, giving them their turn to take action, make decisions, and get results. There isn't some separate action stream where your monsters are fighting each other; rather, "these two monsters deal their damage to each other" is something that an individual PC might try to orchestrate, or perhaps just get well clear of so it happens with a minimum of collateral.
Or, you know, if PCs are facing one group trying to fight them and one trying to do something else, well, which one are you going after right now? If you eat some consequences for what you do they can come in the form of the group you're not targeting taking advantage.
Always consider what faces the players.
Step 3: Special Cases
If a fight between two groups of NPCs takes place on a much larger scale, and PCs have no particular love for one side or the other but just some compelling reason to charge into a war zone, you don't have to worry so much about how much damage Red Grunt 52 takes or if a shot gets through Blue Grunt 37's armor. The PCs don't want to affect the war and they probably can't affect the war - though a good attack now and then might buy them some small peace to operate in - so just treat it as background. Always dangerous, often proximate, background, to whatever is important to them. Describe as you like.
If PCs have made genuine allies and are then fighting beside those allies on a smaller scale, you might want to look at the hireling rules and model their allies as such, usually warriors or protectors, getting involved in the battle but giving the PCs the initiative.
If PCs have made genuine allies and are fighting beside those allies on a larger scale, well, you've got a campaign about the war and should probably be looking at making some custom moves to reflect the progress of the war as the PCs contribute to it, but that's getting far beyond the scope of this question.