I was wondering, can three people practice sword fighting at once with each other or would it be better done by adding in a fourth opponent and breaking them into pairs?
I’m assuming you mean three characters “sparring.” Any number of characters can drill simultaneously. That is to say, they go through the motions, they practice individual techniques. There’s no need for a partner, so three characters can do that without any difficulty.
If characters are engaging in mock duels, then rotating someone out is probably the wisest option. There’s not much value in practicing 1 v 2 unless they’re working on an exhibition routine of some sort. (This would include stunt actors, if you’re wondering.)
Having said that, having a third person to watch can help, as they’ll be able to see things that the two participants may miss, and being able to bounce dialog between three people will be less monotonous than trying to manage dialog with just a pair.
Ironically, my recommendation, if you did choose to add a fourth character would still be to only have one pair practicing while the others watched from the sidelines. How, exactly, they rotate out doesn’t matter. For variety’s sake, I’d recommend against it being two specific pairs switching out. You’ll get more value out of the dialog if the characters stay in flux.
Remember, fighting requires a lot of attention, so your sideline participants are at a significant conversation advantage, unless your fighters stop what they’re doing to talk. If that happens it might be a reasonable moment to swap combatants. This isn’t about winners or losers, it’s about practice.
I’ll also throw out our normal warning about sparring: this is about practicing techniques, and learning to assemble them into a viable fighting style, it’s not about two characters fighting in a socially acceptable way. That said, 18th and 19th century European academies were somewhat lax policing their student’s behavior with swords, and there is an entire history of European dueling long after the practice became illegal. So, if your characters are, “playing,” that’s a bad idea, but it was something that happened.