One of the most important and topical areas of astrophysics at the present time is the dynamic nature of the Sun and its effects on the Earth. The magnetic field of the Sun is a major cause of variations on timescales from seconds to centuries, including the 11-year sunspot cycle, in both the total solar luminosity and in its specific constituents, especially at high energies - UV, X-ray and particles. It is the driving force behind huge solar eruptions, known as coronal mass ejections (CMEs), and the smaller but more explosive energy releases known as solar flares, the latter producing copious high energy particles. All of these solar events produce `space weather' which affects the Earth and human activities but their origins are as yet only crudely understood. The physics of solar variations in general, and of flares and CMEs in particular, is consequently a hot topic of current research in which the St Andrews Solar Physics Group and the Glasgow Astrophysics Group are playing pivotal international roles. Indeed, we are at present in a golden age of discovery for Solar Physics, stimulated by remarkable observations from a series of recent major space missions.