Stars are the part of the sun. When the sun firstly exploded by type || supernova the gases which were included in supernova i.e hydrogen and helium collided far away by nuclear fusion it made a small tiny matter called stars.
The brightness generates from the star's core and it contains hydrogen and helium atoms and due to the gases are in plasma state and as we know that in plasma state ionized gas is involved. But all the stars are not same. Stars can be determined by it heat and light. Some stars are not seen by our naked eyes because are are situated at 25 light years and above away from earth