A planet the size of Neptune wandered too close to its star. The star begins to pull the planet's outer layers onto itself — gas streams off the planet like water from an overflowing bucket. This process is called Roche-lobe overflow (astronomers use this term for the boundary beyond which a star can tear material away from a planet).
It turns out that this gas transfer not only destroys the planet, leaving behind a dense core. It also acts as a giant stabilizer. The star's rotation and the planet's orbit gradually align — the star's axis stops being tilted relative to the orbit. Even if the planet initially orbited "upside down," after a few tens of millions of years the star will be spinning almost in the same plane.
This discovery gives astronomers a new tool. By measuring the tilt of a star's axis, we can figure out how its planet died. If the axis is barely tilted, the planet was most likely destroyed by gas overflow. If the tilt is large and chaotic, the planet was probably ejected from a distant orbit by complex gravitational interactions with other planets.
This approach could help us peer inside dead gas giants. Their cores, stripped of their envelopes, remain in orbit and can tell us what the interiors of these distant worlds were made of.
The Roche lobe is an invisible boundary around a star beyond which the star's gravity is stronger than the planet's own gravity. If a planet puffs up and crosses this boundary, gas begins to flow onto the star, like sand slipping through fingers.