Luminous accreting stellar mass and supermassive black holes produce power-law continuum X-ray emission from a compact central corona. Reverberation time lags occur due to light travel time-delays between changes in the direct coronal emission and corresponding variations in its reflection from the accretion flow. Reverberation is detectable using light curves made in different X-ray energy bands, since the direct and reflected components have different spectral shapes. Larger, lower frequency, lags are also seen and are identified with propagation of fluctuations through the accretion flow and associated corona. We review the evidence for X-ray reverberation in active galactic nuclei and black hole X-ray binaries, showing how it can be best measured and how it may be modelled. The timescales and energy-dependence of the high frequency reverberation lags show that much of the signal is originating from very close to the black hole in some objects, within a few gravitational radii of the event horizon. We consider how these signals can be studied in the future to carry out X-ray reverberation mapping of the regions closest to black holes.