SN1 reaction
SN1 reaction

The unimolecular nucleophilic substitution (SN1) reaction is a substitution reaction. The "1" here says that the rate-determining step is unimolecular, i.e. involves just one reacting molecule breaking a bond on its own to give a carbocation.
Mechanism
Unlike SN2 reactions, SN1 reactions involve multiple steps.

The \[\ce{C-X}\] bond breaks first, before the nucleophile approaches. A carbocation is formed because the central carbon has only three bonds, and it bears a formal charge of +1. The carbocation should be pictured as sp2-hybridised, with trigonal planar geometry. Perpendicular to the plane formed by the three sp2 hybrid orbitals is now an empty, unhybridized p orbital.

In the second step of this two-step reaction, the nucleophile attacks the empty, "electron hungry" p orbital of the carbocation to form a new bond and return the carbon to tetrahedral geometry.

As you can see here, since the leaving group completely dissociates from the vicinity of the reaction before the nucleophile begins its attack, thus the nucleophile is free to attack from either side of the planar, sp2-hybridized carbocation electrophile.

A potential energy diagram for an SN1 reaction shows that the carbocation intermediate can be visualized as a kind of valley in the path of the reaction, higher in energy than both the reactant and product but lower in energy than the two transition states.
Effect of substrate structure on reaction rate
Different substrates have different reaction rates towards SN1 reaction, and the relative reactivity of substrates towards SN1 reaction can be summarized as \[3^{\circ}>2^{\circ}>1^{\circ}\,\text{and methyl}\]. This trend is the exact opposite that of the SN2 because of the stability of the carbocation intermediate.
The mechanism shows that a carbocation is formed in the rate-determining step, so the more stable the carbocation, the more easily it is formed, the more it facilitates the rate-determining step and speed up the whole reaction. Therefore the more stable the carbocation intermediate is, the faster the rate of a SN1 reaction.