It is red because it is cooler than it was in the main sequence star stage and it is a giant because the outer shell has expanded outward. In the core of the red giant, helium fuses into carbon. ... As the core collapses, the outer layers of the star are expelled. A planetary nebula is formed by the outer layers.