What happens to planets after a star dies?
The planets either consumed by the star which will turned into a black hole, gets blowned away or became rogue planets which will explain later.
Before a star die, the star turns into a red giant which causes most of the planets(but in some cases all) are swallowed by it. Then the supernova happens which destroys most of the entire system. If the star was too big or huge, the star becomes a black hole and will swallow pretty much everything in the solar system. However in a case of 1 in a trillion chance, the planets will survive the supernova or getting sucked into the black hole, but they are now adrift in this ocean of stars( cosmos ), forever which be remembered as a fragment of a memory that has been lost forever.