depending upon the number of carbon atoms bonded to the carbon atom to which the halogen is attached, as shown below:

Their reactions are characterised by nucleophilic substitution of the halogen atom, owing to polarity of the carbon¾halogen bond in which the electron-deficient carbon is susceptible to attack by an electron-rich species, namely a nucleophile.
For example, consider the hydrolysis of halogenoalkanes.
R-X + H2O ® R-OH + H+ + X-
With primary and secondary halogenoalkanes, the reaction is very slow at ordinary temperatures, but rapid with tertiary halogenoalkanes. Alkaline hydrolysis is much faster.
R-X + OH- ® R-OH + X-
The rate expression for the hydrolysis of primary halogenalkanes is
Rate = k[RX][OH-]
A one-step mechanism is proposed, in which both reactants are involved in the rate-determining step. (The curly arrows show the direction of movement of a pair of electrons.)
As the OH- ion approaches the electron-deficient carbon atom donating a pair of electrons, the halide ion moves away taking with it a pair of electrons. A transition state is involved, in which the hydroxide and halide ions are both partially bonded to the same carbon.

The rate expression for the hydrolysis of tertiary halogenalkanes is:
Rate = k[RX]
Therefore, the mechanism must involve at least two steps, in which the halogenoalkane takes part in the slow rate-determining step. The following mechanism is proposed:
The tertiary halogenoalkane first ionises in the slow step, followed by the rapid addition of the nucleophile to the intermediate carbocation.
It is the extra stability associated with a tertiary carbocation compared with a primary carbocation, owing to electron-donating alkyl groups, which favours this two-step mechanism.
Secondary halogenoalkanes show a mixture of both of the above mechanisms, with the one-step mechanism predominating.