Active galactic nucleus feedback in clusters of galaxies