Stars are formed from large clouds of gas. The gas, which might be the wisps of older stars which have exploded, or simply left from the Big Bang, is very cold and the cloud begins large but not at all dense.Gravity causes all the atoms of the gas to pull each other together, makes the cloud contract. As the cloud gets smaller, the atoms of the gas get closer together and begin to bump into each other more, which heats them up. The energy of hydrogen atoms bumping into one another becomes so great that they will occasionally fuse together to form a helium atom. So why does fusion reaction give out so much heat? Probably because heat is the increase in kinetic energy of the atoms. But what makes the atoms move at a higher speed at the first place? Is it Gravity?