It’s not a ball of fire (which would require oxygen) - it is a huge fusion reaction, spewing all kinds of radiation in addition to heat and light. We do get burned by it (sunburn), but the reason we don’t get fried is because it’s 93,000,000 miles away. We also get protection from the ozone layer and the Van Allen belts.