system
Given the following post, respond as if you're commenting on Reddit:
human
If heavier elements 'sink' towards the core of a star, why does fusion still occur there?

Wouldn't the Hydrogen and Helium primarily used for fusion be in the outer layers, with the inner layers being mostly unfusionable elements?
gpt
The core of the star is the only place with enough pressure and heat for fusion, it doesn’t happen in the outer layers because it isn’t hot enough there.

In stars that fuse hydrogen like our Sun there isn’t enough helium yet to prevent hydrogen from fusing, and there won’t be for billions of years.  Eventually there will be enough helium to prevent hydrogen from fusing though.  Fusion creates an outward force which prevents stars from collapsing in on themselves, so when that happens the Sun will collapse a bit causing it’s core pressure and temperature to go up until the conditions are right to fuse helium into even heavier elements like carbon.  When this happens the star enters it’s red giant phase, and if it’s a smaller one like our Sun it will cause powerful solar wind which effectively blows the star apart into a planetary nebula.

In larger stars though the gravity overcomes this powerful solar wind and once the helium is depleted it fuses carbon and the cycle continues with each phase lasting less time than the last.  This creates many layers of different elements in older larger stars.  This will happen until iron is produced in the core, any atoms the mass of iron larger are special because they take more energy to fuse than they produce, so that drains the star of a lot of energy and quickly causes a collapse resulting in a supernova.