A long-standing puzzle in astrophysics is to explain why the temperature of the solar corona is over a million degrees (compared with a surface temperature of about 6000 degrees). It is now well established that the mechanism for coronal heating must involve the magnetic field but the details remain controversial. This talk will outline the basic properties of the solar corona and the coronal-heating problem, including advances from recent space telescopes. A strong candidate for dissipating magnetic energy is a process known as magnetic reconnection, which will be explained, as well as the close relationship between solar flares and coronal heating. Recent theoretical results concerning energy dissipation by magnetic reconnection as coronal-loop magnetic fields relax to a new minimum-energy state will be presented.