  Solar flares are energetic events taking place in the Sun's atmosphere, and
their effects can greatly impact the environment of the surrounding planets. In
particular, eruptive flares, as opposed to confined flares, launch coronal mass
ejections into the interplanetary medium, and as such, are one of the main
drivers of space weather. After briefly reviewing the main characteristics of
solar flares, we summarize the processes that can account for the build up and
release of energy during their evolution. In particular, we focus on the
development of recent 3D numerical simulations that explain many of the
observed flare features. These simulations can also provide predictions of the
dynamical evolution of coronal and photospheric magnetic field. Here we present
a few observational examples that, together with numerical modelling, point to
the underlying physical mechanisms of the eruptions.
