Because most stars use up their supply of hydrogen , their outer layers expand and cool to form a red giant .
As stars of at least 0.4 solar masses exhaust their supply of hydrogen at their core , their outer layers expand greatly and cool to form a red giant .