A black hole has an immensely powerful gravitational pull, and if a star wanders too close it can be torn apart.

This video from NASA's Goddard Space Flight Center and CI Lab simulates the star's destruction.

As the star approaches, it gets shredded and its remnants become a disc of hot material spinning around the black hole. The innermost part of the disc blasts out X-ray radiation (shown in white).