The Sun does not have a solid surface or interior and yet it has an edge.
We can only see the photons which are directed toward us. So, if photons are free to stream from the center of the Sun (where the energy is produced) then the Sun would appear quite small, maybe 20 % of its current radius. However, near the center of the Sun, the density of the particles is very high and a photon cannot travel very far before it interacts with some matter. In the center of the Sun, the density is ~150 grams per cubic centimeter (~14 times denser than lead!). This tight packing means that a photon travels less a hundreth of a centimeter before it interacts with a particle. Because of this, photons are in a sense trapped and must only slowly diffuse to the surface of the Sun. This slow diffusion tends to light up a sphere of gas the size of which is determined by the volume over which the photons are essentially trapped.
The photons are trapped (technically, we say that their mean free paths are short), over a sphere whose radius is around 700,000 kilometers. The point where the mean free path becomes large, defines the edge of the Sun. The visible disk of the Sun, i.e., the surface of the Sun, is referred to as the Photosphere