What happens when the supply of Helium is used up? The story is repeated: gravitational contraction takes over and the star collapses further. Eventually other nuclear reactions become viable, power increases until the various nuclei are depleted, then contraction takes over again. In this manner the star produces, Oxygen, Silicon and, finally, Iron. this is, in fact, the way in which these elements are manufactured in nature. Every bit of Carbon in a flower's DNA, every bit of Oxygen we take in every breath, every bit of Silicon in a sandy beach was created in a star.
When the core of the star turns into Iron all nuclear reactions stop, permanently. The reason is that Iron is a very stable nucleus so that if two Iron nuclei are slammed together they will only stick if energy is supplied (in contrast, two Hydrogen atoms stick and also release energy). When nuclear reactions stop gravitational contraction continues again and will proceed until the electrons in it are closely squashed together. As mentioned above electrons dislike being in close contact with each other and when squashed will generate a pressure which opposes gravity; whether this pressure is sufficient to stop collapse depends on how heavy the star is.