You can try this one at home. Get an incandescent light bulb, switch it on, and try to use the light from the bulb to cast a shadow on the bulb.
The problem you’ll run into is that every point on the surface of the light bulb is actively producing light, and in order to form a shadow, you need the surface to be dark, blocked from the light. It’s easy for a bulb or a star to cast shadows outwards; simply place a solid object at some distance from the light. A piece of paper or your hand will suffice for a light bulb; something on the opposite side of your hand will be deprived of the light from the bulb.
The shadow casters around stars tend to be planets and moons. Solar eclipses are the most dramatic proof of this. If you stick the Moon in the way of the Sun, some parts of our planet will be placed in the shadow of the moon. Lunar eclipses, show us the colour of the Moon when it travels through the shadow of the Earth. Like shading your eyes from the sun with your hand (yet another way of forming a shadow around our star), the Earth blocks the light travelling towards the Moon, plunging it into darkness.
Because every point on the Sun’s surface is glowing with light, there’s no way to deprive it of light by casting a shadow. Even if you put another source of light near the surface of the sun (for instance, a glowing filament as shown above), it doesn’t change the fact that the main surface of the sun is still glowing. Any attempt to put an object between the filament and the surface of the sun in order to cast a shadow would simply result in both sides of the object being illuminated! And very likely, said object would subsequent vaporize, given the 5500 degree Celsius temperatures near the surface of the sun.