In any nucleophilic substitution, the SN1 and SN2 processes compete between them.
One will prevail over the other depending on the relative energy of the respective TS's.
What factors make the difference?
The TS doesn't develop any formal charge and won't be stabilized by a polar solvent.
On the contrary, the polar solvent will strongly solvate ('shield') the nucleophile thus hampering its attack.
The presence of good leaving groups favors the SN2 process.
The stronger the nucleophile, the faster the SN2 process.
Substitution at the reacting carbon heavily hinders the SN2 process.
The carbocation - reactive intermediate - bears a net formal charge and is stabilized by solvation.
In the TS the charge is almost fully developed (it resembles closely the carbocation) and it is already stabilized by the solvent.
The presence of good leaving groups favors the SN1 process.
Nucleophile strength doesn't affect the rate of the SN1 process.
Substitution at the reacting carbon stabilizes the carbocation and favors the SN1 process.
Let's recall our experiment!!!
(R)-2-Bromooctane rendered 80% alcohol. From it, 94% was S and only 6% R.
We can now say that 88% of (S)-2-octanol was formed through a SN2 'inversion' process.
In turn, 6% of S isomer and 6% of R isomer were produced by a SN1 'racemization' process.
But,... how come the olefins?