Alkenes undergo electrophilic addition reactions with hydrogen halides, to form alkyl halides. When halogen acids (HX) are added to alkenes, hydrogen adds to one carbon atom whereas halogen atom adds to the second carbon atom of the double bond.

CH2=CH2 + HBr → CH3–CH2–Br

In the process, the hydrogen halide attacks the double bond in the alkene, and the pi electrons in the double bond are transferred to the electrophile, resulting in a carbocation intermediate. This is followed by the formation of the alkyl halide.

In case of unsymmetrical alkenes (which contain unequal number of H-atoms attached to the carbon atoms of the double bonds), the addition of HX takes place according to the Markownikoff’s rule. This rule states that in the addition of halogen acids to unsymmetrical alkenes, the halogen of HX goes to that carbon atom of C = C bond which already has less H-atoms attached to it. Hydrogen atom of HX goes to the carbon atom with more number of H-atoms attached to it. 

CH3CH=CH2 + HBr → CH3CHBr–CH3

If the addition of HBr is carried out in the presence of peroxides such as benzoyl peroxide, then the reaction takes place contrary to Markownikoff’s rule. This is also known as Anti Markownikoff’s addition or peroxide effect

CH3CH=CH2 + HBr + benzoyl peroxide → CH3CH2–CH2–Br