This paper outlines the current understanding of solar flares, mainly focused on magnetohydrodynamic (MHD) processes responsible for producing a flare. Observations show that flares are one of the most explosive phenomena in the atmosphere of the Sun, releasing a huge amount of energy up to about 10 32 erg on the timescale of hours. Flares involve the heating of plasma, mass ejection, and particle acceleration that generates high-energy particles. The key physical processes for producing a flare are: the emergence of magnetic field from the solar interior to the solar atmosphere (flux emergence), local enhancement of electric current in the corona (formation of a current sheet), and rapid dissipation of electric current (magnetic reconnection) that causes shock heating, mass ejection, and particle acceleration. The evolution toward the onset of a flare is rather quasi-static when free energy is accumulated in the form of coronal electric current (field-aligned current, more precisely), while the dissipation of coronal current proceeds rapidly, producing various dynamic events that affect lower atmospheres such as the chromosphere and photosphere. Flares manifest such rapid dissipation of coronal current, and their theoretical modeling has been developed in accordance with observations, in which numerical simulations proved to be a strong tool reproducing the time-dependent, nonlinear evolution of a flare. We review the models proposed to explain the physical mechanism of flares, giving an comprehensive explanation of the key processes mentioned above. We start with basic properties of flares, then go into the details of energy build-up, release and transport in flares where magnetic reconnection works as the central engine to produce a flare.