Answer: -
The first step involves protonation of the carbonyl oxygen.
After protonation, the Alcohol oxygen now attacks the carbon of the carbonyl.
Thus a six membered ring is formed with 5 carbon atoms and 1 oxygen atom. The 1st position carbon atom has 2 OH groups.
One of these gets again protonated.
This leaves as water. With the loss of the H+, there results a carbonyl at 1 position.
Thus 5-hydroxypentanoic acid forms a lactone or 2-oxanone in presence of acid.