Imagine there is a planet in a solar system which has an atmosphere (let's say it is similar to our own atmosphere, but it doesn't have to be) and a very technologically advanced species lives on its surface. The star in the solar system will explode in the next few hundred years, destroying the planet. The species die if they get too far away from their planet, so escaping in generation ships isn't an option.
The species who live on the planet have a way to move the entire planet out into deep space using a magic system, but they don't have a way to maintain their atmosphere once it is away from their star and they become a rogue planet.
Assuming that there aren't any technological restrictions in place, how could the atmosphere be maintained once in deep space? The magic system in place can be used to explain away some minor handwavery, but the solution should be mainly technological.