Right now, deep in the center of our sun, hydrogen atoms are being rammed together to release the energy necessary to hold off gravity. Every second our sun processes 600 million tons of hydrogen in the fusion reaction just to balance gravity exactly. (This is an energy production of 4x1026 Watts!)

A star's only interest in fusion is to use the extracted energy to keep gravity from crushing it out of existence, but turning hydrogen into helium is certainly an interesting side effect! The fusion process takes light elements and puts them together like building blocks, producing heavier elements, such as helium.

\