A red giant results from a main sequence star of small stellar mass (.3 to 8 solar masses), which grows large, luminous, and reddish, with a surface temperature below 5000K. Its spectral class at this point is K-type star, M-type star, or S-type star. Radius grows often to more than an AU, so that the volume of the Sun in such a state would include Earth's orbit.
The star is a red giant for a period at the end of its main sequence lifetime, when the stellar core has fused as much hydrogen as it can and cools and contracts. The layer of gas surrounding the core gets closer to the center, heats and begins fusing, expanding greatly because of the heat.
The core finally collapses and heats, resulting in a helium flash and/or white dwarf.