The protective field wraps the fragile craft in a shimmering cocoon. The attack begins with a blast of charged energy that is harmlessly dissipated into space. The attack picks up and the shields momentarily buckle, resulting in a feedback to the central craft that sets off a fiery display of pyrotechnics.
No. This battle takes place daily in the space about Earth, culminating not in a destroyed control panel on a starship but in a spectacularly beautiful nighttime display called the aurora.
Starship Earth is under constant attack from the Sun, in the form of clouds of ionized gas (called a plasma) that hurtle toward us at speeds of over a million miles an hour. If this solar wind were to reach an unprotected Earth it would bombard us with dangerous high-speed charged particles. Over time the speeding plasma could strip away our atmosphere as is thought to have happened to Mars.
Fortunately, we are not defenseless. Earth's magnetic field acts like Star Trek's shields, deflecting most of the solar wind plasma around us, creating a relatively empty void in space about us. Inside that void we are protected from the worst of the dangers of the solar wind.
Our magnetic shield has to work to do its job. It constantly distorts itself as needed to best respond to the pressure of the solar wind. It's pushed in toward Earth on the sunward side and stretched out to the back in an enormous, bullet-shaped configuration called the magnetosphere. As the solar wind density, speed and direction change, the magnetosphere changes to match. It shrinks when the pressure increases and expands when the solar wind is less strong, constantly matching its strength against that of the solar wind.
One of the fundamental laws of physics notes that magnetic fields are inextricably linked to electric currents and that when you change the magnetic fields the electric currents must change as well. When our magnetosphere expands or contracts, internal currents are set in motion. Some of these electrical currents flow down into Earth's atmosphere near the north and south poles. They pass a million amps or more of current through our upper atmosphere and then back out into space to link back to the magnetosphere.
These currents flowing through our atmosphere cause the gases there to glow, typically a green light from the atomic oxygen which is present at such high altitudes. This glow is the aurora, and is our best indicator that our shield is doing its job, keeping us safe from the dangers of our trek through the stars.