Solar flares are sudden outbursts of energy originating on the Sun’s surface and projecting far into its atmosphere. They occur near sunspots on boundaries dividing areas with opposite magnetic fields.