Berserk, misspelled Beserk in UFO: Enemy Unknown, is one of the three possible forms of Panic that can occur when a soldier's Morale becomes too low. The probability of a soldier going berserk when they fail their Morale check is 1/3. A soldier who has gone berserk will spend all its Time Units shooting at aliens and spinning around looking for aliens.
A berserk soldier's actions are determined by this algorithm:
1) Does the soldier have enough TU to fire their weapon? If so, go to 2. If not, end.
2) Is there an alien in the soldier's field of view? If so, (turn and) shoot it, then go to 1. If not, go to 3.
3) Does the soldier remember the position of an alien? If so, turn and shoot it, then go to 1. If not, go to 4.
4) Turn to a random facing. Go to 1.
Benefits of berserking
1) Like all panic, a soldier who goes berserk will gain 15 Morale.
2) Note that the pseudocode above checks for TU required to shoot the alien, but then turns to shoot the alien. This is not a typo; if turning puts the soldier under the required TU to fire, they will shoot anyway and their TU will underflow to 255, after which they will continue firing as normal. This means that a berserk soldier can potentially put out enormously more firepower than normal; emptying a Sonic Cannon's clip in a single turn isn't unheard-of.
Drawbacks of berserking
Of course, you cannot control a berserk soldier. This means that it is impossible to move the soldier to a better firing location, or to prevent the soldier from firing when friendlies are endangered. They will also always use Snap or Auto shots, which in some cases may not be desirable.
If a soldier who cannot see any aliens goes berserk, the result is functionally the same as a "freeze" panic; they lose all their TU for the turn, but do not drop anything or run around like an idiot. A soldier who can see aliens may perform substantially better than they ordinarily would, especially if caught in a poor tactical situation (e.g. in a room with half a dozen aliens) - the latter is pretty likely if the battle is going poorly enough for Morale checks to actually be happening.
As such, Berserk is generally the least bad of the panic states, and sometimes a better result than succeeding on a Morale check.