In this Letter we propose a kinematic model to explain how collisions with a surface and rotational Brownian motion give rise to accumulation of microswimmers near a surface. In this model, an elongated microswimmer invariably travels parallel to the surface after hitting it from an oblique angle. It then swims away from the surface, facilitated by rotational Brownian motion. Simulations based on this model reproduce the density distributions measured for the small bacteria E. coli and Caulobacter crescentus, as well as for the much larger bull spermatozoa swimming between two walls.