We present a model for the short time-scale spectral variability of accreting black holes. It describes the time-averaged spectra well, and also temporal characteristics such as the power-density spectrum, time/phase lags, and coherence function of Cygnus X-1. We assume that X/gamma-rays are produced in compact magnetic flares at radii less than or similar to 100GM/c(2) from the central black hole. The tendency far magnetic loops to inflate and detach from the underlying accretion disc causes the spectrum of a flare to evolve from soft to hard because of the decrease of the feedback from the cold disc, so causing time delays between hard and soft photons. We identify the observed time lags with the evolution time-scales of the flares, which are of the order of the Keplerian time-scale. We model the overall temporal variability using a pulse avalanche model in which each flare has a certain probability of triggering a neighbouring flare, thus occasionally producing long avalanches. The duration of the avalanches determines the Fourier frequencies at which most of the power emerges.