This diagram plots a star's luminosity, or absolute magnitude, and its spectral class, as well as color. One can see that there is a relationship between a star's color, and its temperature. The hotter stars tend to be towards the blue, whereas the cooler stars towards the red. This is because in the visible light part of the electromagnetic spectrum, violet and blue carry the most energy.
When looking at a star's magnitude in the diagram, negative numbers indicate more luminosity.
If you want to know more about black holes, see: https://www.nasa.gov/black-holes
For main sequence stars, subgiants, bright giants, and supergiants, light is produced through thermonuclear fusion, which occurs in their cores. Main sequence stars (like our Sun) fuse hydrogen into helium. The giants fuse heavier elements, up to iron and nickel. When the atomic nuclei collide, some of the energy of the collision becomes photons (the particles of light), which then travel from the core to the star's surface.
For more information: https://imagine.gsfc.nasa.gov/science/objects/stars1.html
A star is a ball or spheroid of plasma held together by its own gravity. The nearest star to Earth is the Sun. Not counting the Sun, the nearest star is the Alpha Centauri triple star system, which is 4.37 light years away. Stars form from the dust and gas in nebulae through gravitational collapse. When stars end their life, the gas and dust is dispersed through the interstellar medium. This dispersed gas and dust can then form part of other stars, planets, and possibly life forms. This is what occurred before our solar system was formed. We are stardust.
Sources: https://www.space.com/18964-the-nearest-stars-to-earth-infographic.html
https://science.nasa.gov/astrophysics/focus-areas/how-do-stars-form-and-evolve