Formation of a bromohydrin:
The reaction of an alkene with a halogen like bromine and chlorine generally provides a vicinal dihalide. Though, if the reaction is performed in water as solvent, the product acquired is a halohydrin in which the halogen adds to one end of the double bond and a hydroxyl group from water adds to the other as shown in figure.
Figure: Formation of a bromohydrin from 2, 3-dimethyl-2-butene.
In this reaction, the 1st stage of the mechanism carry on as normal, but after that water works as a nucleophile and 'intercepts' the carbocation intermediate as displayed in the figure.
Figure: Mechanism of bromohydrin formation.
Because water is the solvent, there are far more molecules of it present as compared to the number of bromide ions produced from the first stage of the mechanism.
Water makes use of a lone pair of electrons on oxygen to create a bond to the carbocation. The result of it is, the oxygen effectively 'loses' an electron and gains a positive charge. This charge is lost and the oxygen regains its 2nd lone pair while one of the O-H bonds breaks and both electrons move onto the oxygen.