At the center of that huge cloud, gravity caused the material to build up into a ball. Once this got big enough, the huge pressure inside started a fusion reaction. The energy this released caused that ball to heat and shine.