X-ray astronomers discovered the diffuse gas in clusters of galaxies about 20 years ago. It was later realized that the central gas density in some clusters, and in elliptical galaxies, is so high that radiative cooling is a significant energy loss. The cooling time of the gas decreases rapidly towards the centre of the cluster or galaxy and is less than a Hubble time within the innermost few hundred kiloparsecs. This results in a cooling flow in which the gas density rises in order to maintain pressure to support the weight of the overlying gas. The rate at which mass is deposited by the flow is inferred to be several hundreds of solar masses per year in some clusters. The fraction of clusters in which cooling flows are found may exceed 50 per cent. Small flows probably occur in most normal elliptical galaxies that are not in rich clusters. The implications of this simple phenomenon are profound, for we appear to be witnessing the ongoing formation of the central galaxy. In particular, since most of the gas is undetected once it cools below about 3 million K, it appears to form dark matter. There is no reason why it should be detectable with current techniques if each cooling proton only recombines once and the matter condenses into objects of low mass.