But with the energy being generated further out in the star, there is nothing left to support the core, so it collapses under its own weight, creating energy in the process. When this energy is added to the energy created by the burning hydrogen, it increases the outward pressure in the star, overcoming the inward pull of the star's gravity, and making its outer layers expand rapidly. Eventually, the pressure drops away to a point where the pull of gravity balances it again, but by this point, the star will be many times its original size. At the same time, the star changes colour - it keeps on producing roughly the same amount of energy, but because the surface is so much larger, the energy escaping through each square metre of it gets much less. This makes the star's surface temperature drop by several thousand degrees, and its colour will change from blue or white hot to relatively cool red heat.
Stars can actually go through several red giant phases.
For example, our Sun will be a red giant twice. It has enough mass that, when its core collapses after it has finished burning hydrogen, it will eventually reach such a high temperature that it will be able to burn helium, the next heaviest element. For a while, this will stabilise the Sun, and it will shrink back to a more normal size, but after a relatively short time, the helium will be used up, and the whole process will repeat itself - this time not stopping until the Sun's outer layers have been blown off in a series of shells to form a glowing 'planetary nebula'.