This is an empirical (experimentally-derived) rule based on Markovnikov's observations (1870) on the addition of hydrogen halides to alkenes. The rule states that:
"When an unsymmetrical alkene reacts with a hydrogen halide to give an alkyl halide, the hydrogen adds to the carbon of the alkene that has the greater number of hydrogen substituents, and the halogen to the carbon of the alkene with the fewer number of hydrogen substituents"
This is illustrated by the following example:
Look at the position of the H and the Br in relation to the statement of Markovnikov’s rule given above.
Modern mechanistic knowledge indicates reaction occurs via protonation to give the more stable carbocation.
Here we see that in principle, propene can protonate to give two different carbocations, one 2o and the other 1o. Formation of the more stable 2ocarbocation is preferred.
The carbocation then reacts with the nucleophile to give the alkyl bromide and hence 2-bromopropane is the major product.
Although Markovnikov's rule is specifically applied to the addition of hydrogen halides to alkenes, many addition reactions to alkenes are also described as Markovnikov or anti-Markovnikov depending on the regioselectivity of the addition reaction.
In more general terms, Markovnikov's rule can be "modernized" to cover other addition reactions by considering that the electrophile adds to the least substituted end of the alkene giving rise to the more stable intermediate. So let's rephrase our statement of Markovnikov's rule:
"When an unsymmetrical alkene undergoes addition with E-Nu, then the electrophile, E, adds to the carbon of the alkene that has the greater number of hydrogen substituents, and the nucleophile, Nu, to the carbon of the alkene with the fewer number of hydrogen substituents"