Ultra-high energy cosmic rays pose an extreme challenge to theories of particle acceleration. We discuss the reasons why diffusive acceleration by shocks is a leading contender. A crucial aspect of shock acceleration is that cosmic rays must be efficiently scattered by magnetic field. This requires magnetic field amplification on scales comparable with the cosmic ray Larmor radius, which in turn indicates that the shocks cannot be fully relativistic; nor can the shocks be too slow. The lower limit, arising from the Hillas condition, on the energy processed in the shock severely restricts the range of possible sources of UHECR. These conditions combine to make the lobes of radio galaxies a likely source of UHECR.