Graph of Binding energy per particle in an atomic nucleus versus the atomic mass number: note that before Fe-56 (Iron), lighter elements fuse together to release energy. After Iron, matter will release energy if they undergo fission. (like nuclear reactors)
This nuclear reaction will stay for quite a while as long the star has hydrogen fuel to burn. Now, this is truly an action of balance. The hydrogen will be fused together into heavier elements such as carbon, oxygen, neon, and since the heavier elements are denser, they will be drawn into the core of the star faster than other elements.
Very soon, the star will have no more hydrogen fuel to do the nuclear fusion now the star seeks for an alternative fuel, the heavier elements. So, the star now started to fuse oxygen, lithium, and all the other elements in the familiar periodic table in your chemistry class into even heavier elements, now the star begin to feel heavy, literally. The core of the star contains more and more heavy elements up to iron.
Iron is the last heavy element, sort of like a nuclear waste for a fusion reaction because fusing two iron nuclei together will absorb energy rather than releasing it. Since a star is an energy factory therefore, a star is at the death row when it sees itself staring at a core of iron at its centre because it has nothing else to fuse and generate energy.