The solar corona, the outer atmosphere of the Sun, is heated to millions of degrees. This is several orders of magnitude hotter than the photosphere, the optical surface of the Sun, below, and a mystery that has baffled scientists for centuries. The answer to the question of how the solar corona is heated lies in the crucial magnetic connection through the atmosphere of the Sun. The magnetic field that threads the corona extends below the solar photosphere, where the convective motions drag the magnetic field footpoints, tangling and twisting them. The chromosphere is the atmospheric layer above the photosphere, below the corona, and the magnetic field provides an important connection between these layers. The exchange of mass and energy between the chromosphere and corona is an essential piece of this puzzle. The connection between the chromosphere and the corona is a challenging piece of the puzzle both observationally and computationally, as it is highly complex in space and time. We describe the history of the observations and theoretical understanding of the heating of the solar atmosphere, and end with future prospects of the coronal heating problem.