Like most stars, during the main phase of its lifetime, the Sun creates energy by fusing hydrogen atoms in its core. In about 5 billion years, the Sun will start to run out of hydrogen in its core to fuse, and it will begin to collapse.