The Sun is just a big plasma ball of hydrogen, held together by the mutual gravity of all its mass. This enormous mass pulls inward, trying to compress the Sun down. As the pull of gravity compresses the gas inside the Sun together, it increases the temperature and pressure in the core.