Caption: Cartoon of photons (more realistically, photon packets) executing a random walk from the interior of a star and then escaping from the photosphere.
Features:
There are also true sources/sinks for EMR in general.
Between interactions, the photons can be modeled as traveling in straight lines.
The upshot of the aforesaid description is that radiative transfer is by a random walk which becomes fully freestreaming only in the limit of zero opacity. The overall motion of individual photons is complex, but in aggregate their behavior can be treated statistically as discussed below. At the macroscopic scale the cumulative effect of all the random walks is a diffusion process.
However, one can model the radiative transfer by photon packets in a Monte Carlo radiative transfer computer simulation of a random walk. The photon packets only lose/gain energy when the EMR field loses/gains energy. Scattering and absorption/reemission of a photon packet changes its frequency/wavelength (scattering only slightly usually) but NOT its energy. Thus, the photon packet is indestructible and propagating through the entire star or other systems of gas by effective scattering. Photon packets, in fact, give the aggregate behavior of large groups of photons on average, capturing both the random walk behavior and the absorption/reemission behavior.
Well, their average position stays in the zone of initial creation in the star's nuclear burning core, but the distribution of any set of photon packets widens until it's broader than the star. So eventually, all the photon packets will be outside of the star freestreaming to infinity---while their average position stays in the star's nuclear burning core.
Note also that star density falls outward from the center, and so this biases a random walk direction toward the surface region (i.e., photosphere and stellar atmosphere) of a star. The bias is because photon packets have longer steps usually in the lower density directions because of usually lower opacity in those directions.
A rough estimate is of order 10,000 years for a photon packet to go from center to photosphere of the Sun (Shu-90).
Recall from above, NO single photon goes very far in a star. Photons are created and destroyed as energy is propagates outward. But computer simulation of radiative transfer by indestructible photon packets gives the aggregate behavior as aforesaid.
However, energy signals do NOT have to rely on radiative transfer. Asteroseismic waves (for the special case of the Sun, these are called helioseismic waves) can travel much faster from center to photosphere of stars (including the Sun) than photon packets random walking though much slower than the vacuum light speed c = 2.99792458*10**5 km/s. Yours truly CANNOT find a source that says how fast at this moment.