Stars are fearsome things. Besides just emitting extraordinary amounts of energy all the time like it's a run-of-the-mill thing, they will sometimes also flare, blasting out tremendously huge bursts of matter and energy on a scale that only be described as "underwear-soiling."
Flares are magnetic events. As I've described them before:
[T]he Sun has a very complicated magnetic field. Inside the Sun there are enormous packets of hot plasma (gas with its electrons stripped off) that rise from deep within. These blobs have their own internal magnetic field, and as they rise to the surface the huge loops of magnetic field lines (similar to what you see in bar magnet diagrams) pierce the surface. These loops carry a vast amount of energy with them, and normally carry that energy up the loop and back down into the Sun.
But if a bunch of these loops get tangled, they can interact and connect with each other, releasing their energy all at once. The resulting explosion dwarfs our planet's entire nuclear arsenal and is what we call a solar flare. Sometimes, this can trigger an even larger release of energy in the Sun's outer atmosphere (the corona). That's a coronal mass ejection. The expanding bubble of subatomic particles and energy sweeps out into the solar system, and if it hits the Earth, it can connect with our own magnetic field, creating all kinds of havoc.
A big event can cause power grid surges, widespread blackouts on Earth, damage to electronics, satellites, and more. Studying them is interesting, but also critical to our modern civilization. That's not hyperbole.
The power for these events comes from the motion of gas inside the Sun. We know that stars rotate faster when they're younger, and are far more magnetically active, so very young stars should blast out intense flares, and quite often.
And oh my do they. To study these phenomena, astronomers used the Chandra X-ray Observatory to look at star-forming nebulae, where stars are still actively being born. Flaring stars put out a lot of X-rays, so these are good places to look for lots of temper-tantruming stellar babies all at the same time. Out of more than 24,000 young (<5 million years old) stars that emitted X-rays, they found 1,086 that had particularly large flaring events.
Now, by "particularly large", I want you to appreciate what I mean. In the year 774 AD, the Earth was slammed by a massive flare from the Sun, so powerful it altered our atmospheric chemistry and left traces we could find 1200 years later.
So. The least powerful flares seen by Chandra were like that one. The most powerful ones, called megaflares, were 100,000 times stronger.
Yeah, take a moment to soak that in. One. Hundred. THOUSAND. Times.
Yes. Underwear-soiling. A flare that powerful from the Sun today would be bad. Very, very bad.
But can the Sun do this? Well, the 774 flare was the most powerful event in the past 10,000 years to hit Earth, so it's extremely unlikely it will ever produce anything on this scale (it can still blurt out powerful flares, but not like these). Remember, the stars examined were very young, so could generate much fiercer storms. The Sun is old and tired, and unable to produce such ridiculously energetic explosions.
So that's good. Still, these young stars are just pouring out energy in these events. What effects do these have on their environments, on any planets orbiting them, and what specifically causes them?
The astronomers found an interesting trend in the megaflare stars: It didn't seem to matter if they had disks of planetary material around them or not; they all flared at about the same energy levels and as often. There's an idea that perhaps the magnetic field of the young stars can couple with these disks, enhancing their power, but that appears to not be the case. That means the stars generate these blasts all by themselves, just like the Sun does now on a far smaller scale.
They saw stars from tiny red dwarfs up to huge blue-white beasts 18 times the mass of the Sun all experience these flares. They also found that very young stars with about the same mass as the Sun flare about 1.7 times per year, which is soul-chilling. A planet around a star like that would get cooked by it, hit by immense blasts every 7 months or so. If the planet were close in, this could strip away a lot of its atmosphere. Many exoplanets detected orbiting close to their stars are much more massive than Earth but appear to have little atmosphere; these may have started off as Neptune-like worlds with a thick atmosphere, but their active stars sand-blasted the gases away.
That's planetary destruction on a scale that's difficult to imagine. But it's perhaps not all bad: For stars that haven't yet begun to form planets, these flares can strip away excess gas in their surrounding disks that was making it difficult for rocky grains to form. Once the gas is thinned these bits can aggregate, growing in size, eventually forming the planets themselves. This means the flares might actually speed up the planetary construction process.
Not to be too obvious, but the Sun was young once. At 4.6 billion years, this sort of thing is beyond the Sun's abilities now, but back in the day it was rapidly rotating, magnetically fierce, and almost certainly knocking out one of these flares every year or so. This must have had an effect on the solar system's nascent planets at the time, though the specifics aren't clear.
However, by studying these other stars we can learn what this hellish environment might have been like for our worlds, including the one you're sitting on. Solar flares are far smaller now, but that doesn't mean they're without their power, so everything we can do to learn about them is a pretty good idea.