It is well known that SN1 reactions often give incomplete racemisation:
Although many first-order substitutions do give complete racemization, many others do not. Typically there is 5–20% inversion, although in a few cases, a small amount of retention of configuration has been found. These and other results have led to the conclusion that in many SN1 reactions at least some of the products are not formed from free carbocations but rather from ion pairs.
We can explain this by realising that the SN1 and SN2 mechanisms are not really discrete, as often taught, but rather two extremes of a 'mechanistic continuum'. This has implications for both the stereochemical outcome of many substitutions (i.e. proposed SN2 are not always as stereospecific as one might expect), and also the kinetics (i.e. measuring the rates of substitutions won't always give data consistent with purely SN2 or purely SN1 mechanisms).
- At the SN1 extreme, there is no covalent interaction between the reactant and the incoming nucleophile during the transition state (TS) for the cleavage of the leaving group.
- At the SN2 extreme, the TS has covalent interactions in which there is concerted formation of a new bond between the incoming nucleophile and the reactant , with cleavage of the bond to the leaving group.
This mechanistic continuum was first explained by Winstein, who studied both the kinetics and resulting stereochemistry of nucleophilic substitutions at saturated carbons.  This model is widely accepted, though rarely taught at the undergraduate level.
Winstein's theory proposes the presence of several additional intermediates along the reaction coordinate- these are known as 'ion pairs' and represent varying levels of association between the reagent and the leaving group. The energy levels between these ion pairs are small, and nucleophilic attack can occur at any stage (hence the continuum).
Fig1: Winstein model for nucleophilic substitution. Taken from Carey's Advanced Organic Chemistry. Part A. /2
The Winstein model fits with what is commonly taught, namely that SN1 gives racemisation and SN2 gives inversion:
- SN2 reactions occur when the nucleophile intercepts the contact ion pair and give stereospecific inversion of configuration since the leaving group is still associated with the carbocation, essentially shielding one face from attack
- SN1 reactions occur when the nucleophile intercepts the fully dissociated free carbocation and gives complete racemisation as both faces of the planar carbocation are equally accessible
Which mechanism operates is largely determined by how stable the carbocation is. Primary carbocations are highly unstable and as such there is little (if no) dissociation. Tertiary cations are stable and as such complete dissociation can occur.
The interesting case is where nucleophilic attack occurs on a solvent separated ion pair - we see neither complete inversion nor complete racemisation, as some association still exists at this stage (partially, but not completely blocking one face of the cation).
Modern Physical Organic Chemistry  gives an overview of all of the possibilities, though the figure is a little hard to follow:
: J. Am. Chem. Soc. 1956, 78, 328
: Advanced Organic Chemistry - Part A; Springer: New York, 2007
: Modern Physical Organic Chemistry; University Science Books, 2006