Heat is the motion of atoms and molecules: the higher the temperature, the greater their velocity and the more violent are their collisions. When the temperature at the center of the newly-formed Sun became great enough for collisions between nuclei to overcome their electric repulsion, nuclei began to stick together and protons were combined into helium, with some protons changing in the process to neutrons (plus positrons, positive electrons, which combine with electrons and are destroyed). This released nuclear energy and kept up the high temperature of the Sun's core, and the heat also kept the gas pressure high, keeping the Sun puffed up and stopping gravity from pulling it together any more.
That, in greatly simplified terms, is the "nuclear fusion" process which still takes place inside the Sun. Different nuclear reactions may predominate at different stages of the Sun's existence, including the carbon-nitrogen cycle which involves heavier nuclei, but whose final product is still the combination of protons to form helium.
A branch of physics, the study of "controlled nuclear fusion," has tried since the 1950s to derive useful power from "nuclear fusion" reactions which combine small nuclei into bigger ones--power to heat boilers, whose steam could turn turbines and produce electricity. Unfortunately, no earthly laboratory can match one feature of the solar powerhouse--the great mass of the Sun, whose weight keeps the hot plasma compressed and confines the "nuclear furnace" to the Sun's core. Instead, physicists use strong magnetic fields to confine the plasma, and for fuel they use heavy forms of hydrogen, which "burn" more easily. So far, no success--magnetic traps are rather unstable, and any plasma hot enough and dense enough to undergo nuclear fusion tends to slip out of them after a short time. Even with ingenious tricks, the confinement in most cases lasts only a small fraction of a second.
The Sun today still consists mostly of hydrogen. The fuel supply which has seen it through its first 5 billion years should be good for about as long in the future.
The Evolution of Stars
Apart from the planets, almost every star we see at night is a sun: some are bigger than ours, some smaller, some are at an earlier stage of their developments, some at a later one, and some have evolved altogether differently, for a variety of reasons. The telescope allows astronomers to observe and compare stars of different size, at different stages of evolution. Their smooth spectra tell about their temperatures, their spectral lines reveal some of their composition, and based on these, a general theory of "stellar evolution" has been formulated, which also applies to our own Sun, a typical "main sequence" star.
All such stars burn hydrogen to produce helium, where "burn" refers to nuclear processes, not to the (completely inadequate) chemical process of fire. Big stars burn rapidly and brightly, like the candle in Edna St. Vincent Millay's poem