(Answered from the UK) It's a public order act offence (section 3 of the 1986 act).
Affray is committed when a person uses or threatens unlawful violence. But it doesn't stop there. The law also requires a hypothetical person of "reasonable firmness" (who need not even have been present) to be in fear for their own personal safety as a result of this unlawful violence.
It is often used as an alternative charge to assault when a victim doesn't want to pursue a complaint. For years, this was quite normal. Nowadays, people often run the point that a fight or argument that is clearly between 2 people would not cause any other person to be in fear for their own safety. The public order act was created as a reaction to the miners' strike in the mid 80s. The idea was that wanton and random violence would cause fear to any person. The act did not have "alternative to assault" in mind.
Maximum sentence in the Crown Court is 3 years for affray.
(in the US) In those jurisdictions which even have such a statute it usually refers to violent confrontations between individuals, and is worded similarly to - - "two, or more, persons, fighting abroad to the terror of the public."
Actions such as large neighborhood fights, gang fights, near-riots, etc., would be an example