Note: Major Star Wars: The Force Awakens spoilers ahead.
In Star Wars: The Force Awakens, the next generation of the Empire — known as the First Order — has developed a giant weapon called Starkiller. It's like the Death Star's primary weapon, but on steroids — this is an actual war with stars. Starkiller is a snowy, forested planet that has been hollowed out; now it's a military base. Its name reflects its function: Starkiller sucks in the materials of nearby stars and stores them in the planet's core. Then, the First Order can shoot this star stuff out of a gigantic cannon, creating a huge beam of plasma capable of eviscerating multiple planets within a system.
Star Wars with actual stars
The film doesn't specify what technology the First Order uses to drain stars — but there's a real life equivalent, kind of. Black holes can slurp materials off stars, but their work is a lot messier.
Black holes are incredibly dense objects in space — so massive that not even light can escape their intense gravitational pulls. And at the right distance, stars can orbit around these black holes, just like planets orbit around the Sun. But every so often, a star will become dislodged from its spot and get too close to the black hole it orbits.
That's when the star is doomed. The hole's immense gravitational forces take hold. The star will either plunge directly into the black hole or be ripped apart. When a black hole rips a star apart, the star's debris funnels into the black hole — kind of like water flushing around a toilet. That seems to be how the Starkiller weapon worked, by funneling the star's gas toward a single point. But when a black hole does that, the process isn't as uniform as the movie depicts. "The gas of the star flies everywhere, and some of it goes into the black hole, and some forms a gaseous disc," said Roseanne Cheng, an astrophysical scientist at Johns Hopkins University.
That disk is known as an accretion disc; it's a flat spinning band of gas, dust, and other stellar debris that circles around the edge of the black hole. The immense forces cause the disk to rapidly spin inward toward the black hole's center. This motion creates a stressful environment: intense heat, powerful x-rays, and gamma rays. All this action also produces a powerful magnetic field, which twists out from the spinning black hole. So if some kind of black hole technology is draining the star in The Force Awakens, there would be a hot, gaseous cloud circling the Starkiller base — and it would be dangerous.
People woulld be stretched into long spaghetti-like tubes as they fell down the black hole
Additionally, as stellar debris from the disk falls into the black hole, the materials sometimes get excited and are released outward in the form of high-speed jets. (Very high speed: The particles in these jets move at nearly the speed of light.) Scientists aren't exactly sure how the jets work: no one knows how the form or what powers them, though it's possible they are shaped by the twisting magnetic field. At any rate, those jets were also absent from Starkiller.
In fact, it's remarkable that people would be living on Starkiller if anything like a black hole was present. The planet would probably be pulled apart by the black hole's immense gravity. And any people would be stretched into long-spaghetti like tubes as their bodies fell toward the black hole's center — that's how serious the gravity is.
Of course, the events in The Force Awakens take place in a far away galaxy, one where something called the Force permeates the universe and pretty much allows for magic. Perhaps this all-encompassing Force means that you can do whatever you want with star stuff. Just so long as you're smarter than a Stormtrooper.