To resolve such a situation in a satisfactory way, you need a lot more detail.
For example, what kind of town is this? Is it known for the totalitarian rulership going on there? Or for corrupt police forces? Do the laws stipulate that "civilians" (what does that even mean in a medieval world - btw, is it a medieval world?) must go unarmed all the time? Or is this taking place in a warrior culture, and everybody pretty much goes armed all the time? Is there a ban on public gatherings - and is there a good (or evil) reason for such a ban? Are there any background factors you need to take into account, like food shortages, racial upheavals, unusual environmental conditions, plague, religious zeal, a public hero being put to death on a trumped-up charge, a crime wave, etc.?
On to the situation itself: has there been blood already, maybe even several deaths, or is it more of a brawl? How messy is the situation - all a big clump of people struggling, or more of a standoff with clearly delineated sides? How big is the fight - a dozen guys slapping around four guards, or more like hundreds of citizens duking it out with the entire militia? What escalation is possible if the PCs don't intervene?
And so on, and so on. Whenever my PC finds him-/herself in a situation of the kind you briefly sketched, I'll probably know how to react properly and in-character. But that really requires more information.