The Yarkovsky-O'Keefe-Radzievskii-Paddack (YORP) effect may spin up or spin down 5-km-radius asteroids on a 10 8-year timescale. Smaller asteroids spin up or down even faster due to the radius-squared dependence of the YORP timescale. The mechanism is the absorption of sunlight and its re-emission as thermal radiation from an irregularly shaped asteroid. This effect may compete with impacts and tidal encounters as a way of changing rotation rates for small asteroids, especially in the near-Earth region. The YORP effect may explain the rapid rotation of 1566 Icarus and the slow tumbling of 4179 Toutatis. It may explain to some extent the slow rotation of 253 Mathilde. Meteoroids spin up or down on timescales fast compared to their cosmic ray exposure ages.