I was wondering if the sun is a planet?
The sun is a star because it produces the energy it radiates and makes itself visible. This energy is a result of thermonuclear reactions taking place in the core of the star where the temperature reacxhes at
T = 20,000, 000 0 K - high enough to tirgger thermonuclear reactions (formation of one nucleus of helium from nuclei of hydrogen).
Planets can't produce enough energy that makes them visible in space, they are cold cosmic bodies visible only if there is a star the radiation of which is reflected by the planet back to space.
Stellar masses are arranged from 0.01 - 100 solar masses (theoretical upper limit, while observable is around 46 solar masses). Planets orbit their central stars, while stars orbit the center of the Galaxy (Milky Way).