We compute the Betti numbers and describe the cohomology algebras of the ordered and unordered configuration spaces of three points in complex projective spaces, including the infinite dimensional case. We also compute these invariants for the configuration spaces of three collinear and non-collinear points.