When this happens is dependent on a number of factors such as the velocity of the wind, design of the hull and rudder and shape of the sails.
Rounding up can be startling to those on board: The boat turns into the eye of the wind with all sails fluttering.
Rounding up is in fact a safety design of most sailboats that can help prevent a knock-down and allow the helmsman to regain control of the boat.
In smaller sailboats such as racing dinghies where the sail cannot be lessened or reefed, frequent round-ups may be a sign that the wind conditions are too strong for the boats and they should immediately proceed to shelter.
If this is not possible due to rig design, for example, then sail adjustment may reduce or prevent rounding up when beating to windward.