Here is the text of the feature we are talking about (from the hydra statistics block):
Reactive heads. Each hydra has more than one head, it generates an additional reaction that can only be used for opportunistic attacks.
And here is an explanation of how the reactions are used and when you receive them (from the Combat chapter of Basic rules):
A reaction is an instant response to any trigger, which can happen in your turn or at someone else 's. The opportunity attack … is the most common type of reaction … When you react, you can not take another one before the start of your next turn.
By combining these two elements, the Hydra, unlike most creatures, has more of a reaction to take by round, recovering all past reactions early in his next turn. There are no restrictions as to when these reactions may occur in this time frame. They can therefore occur simultaneously or separately during the turn, at the choice of the hydra.
In addition, there is no rule that a provocation, such as getting out of the scope of a hydra, can only lead to an attack on an opportunity. This means that if multiple creatures take opportunity attacks or multiple heads do, all of them can still occur at the same time in response to the same provoking trigger.