HELLO THERE!
First, you need to keep two things in your mind:
(1) The reaction that proceeds by Markovnikoff’s Rule, carbocation is formed as an intermediate.
(2) The reaction that proceeds by Anti-Markovnikoff’s Rule, free radical is formed as an intermediate.
When it comes to the Markovnikoff’s Rule:
HBr, HCl and HI -- all three halogen acids can be added to an alkene through Markovnikoff’s rule. As two degree carbocation is more stable than a one degree carbocation, if the chloride/bromide/iodide from the respective halogen acids get added to the two degree carbocation (substituted from two sides), the product will be the major product.
When it comes to the Anti-Markovnikoff Rule:
Only HBr shows Anti-Markovnikoff’s rule in presence of Peroxide. HCl and HI does not show Anti-Markovnikoff effect.
This has some reasons.
The reaction proceeds by Free radical mechanism. Bond dissociation energy, of HI, though less han HBr, when Iodine free radical is formed, it is so reactive that it forms iodine molecule (instead of attacking the alkene).
In case of HCl, it has a higher bond dissociation energy than HBr. So, the process of free radical formation is endothermic, which does not favour the reaction.
=> Generally Benzyl Peroxide, (C6H5COO)2 is used for the purpose, which is of course an organic peroxide.
THANKS!