What happens when a star like the sun exhausts its core hydrogen supply?