During the course of a star's lifetime, it goes through different phases as the nuclear fusion reactions inside it change.
A star can become a type of giant star called a red giant when it has converted all the hydrogen fuel in its core into helium and begins burning up the hydrogen in its outer layers to resist gravity's inward pressure. As this happens, the star swells greatly in size and it glows more brightly. Due to subsequent changes in the fusion reactions, the star may move in and out of the red giant state, becoming different types of giant star.
NOTE: Above information has been taken from wikipedia and/or official websites of topics.