The Sun, our local star, is just under a million miles in diameter. The surface temperature is about 5,000K, and the power output is about 4E26 watts.
All that power is coming from the innermost 10% of the star -- the core -- where the temperatures are around 17E6K, and the pressure is ...um... crushing.
At those temperatures the Hydrogen atoms cannot hold onto their electrons. So protons and electrons are free to zoom about without binding. The velocities of the protons are so high, and the pressures are so great, that every once is a great while two protons will get close enough that the strong nuclear force will bind them together into Helium. This happens to about 500 metric tons of Hydrogen each second. In that reaction a lot of high energy gamma rays are released.
Those gamma rays are trapped within all those charged particles in the core. They bounce around in the core, doing a random walk for thousands of years. But eventually they reach the outer shell of the core where they can heat the Hydrogen gas outside the core.
The bouncing around of all those gamma rays creates an outward pressure that keeps the core of the Sun from collapsing under the weight of the Hydrogen above it.
The hydrogen outside the core, heated by the gamma rays escaping the core, rises to the surface of the star in a massive convection current. Upon reaching the surface, the heat of that gas is radiated at 5000K and reaches us ~8 minutes later.
This process has been going on for nearly five billion years, and will continue for another five billion or so. However...
The Helium building up in the core takes up space. This impedes the fusion reaction. Fewer gamma rays are produced, causing the core to contract. This heats the core driving the fusion rate back up, but at a slightly higher temperature.
Thus, the Sun is gradually warming. It is about 10% hotter today than when it formed, and it will continue to get hotter and hotter as the eons pass. In about 200 million years, it will be too hot for water to remain liquid on the surface of the Earth.
So, I guess we'll have to move the Earth a bit farther out.
Source: x.com/unclebobmartin/status/1824467064074985623