Star

A star is a ball of helium and hydrogen that will burn using a process known as nuclear fusion.

Birth of a star
All stars are born inside a cloud of dust and gas, known as a nebula. Nebulas form during supernova explosions or star collisions. Over millions of years, gravity pulls clumps of the gas together, and they get larger and larger. Eventually, the largest clump becomes a protostar and pulls in lots of matter. If the star isn't massive enough, it becomes a brown dwarf, which isn't exactly a star. Brown dwarfs glow a little. If the star is massive enough, then nuclear fusion starts and the star enters main sequence.

Death of a star
Once a star has used up its hydrogen and reaches its expiration date, it will start to die. There are different ways a star can die, depending on how massive the star is. Stars less than half the mass of the sun are called red dwarfs. These stars are the only type that don't have a giant phase. Instead, they start to lose light and start to shrink, and eventually it becomes a black dwarf. Red dwarfs also have a period in their deaths that they will become a blue dwarf.

K-type stars, or stars about the same mass as our sun, will have a giant phase, since they are massive enough to fuse hydrogen into helium. First it becomes redder and redder, and while it becomes red it will expand. Eventually it will burst its outer layers into space, and all that gas forms a planetary nebula. The gas of the nebula will be used to form new stars, but there is still something left of the star. This is a white dwarf, about the size of earth, but it is still as massive as the sun.

Stars that are 8 solar masses or larger will become supergiants or hypergiants. Stars this massive will fuse hydrogen into helium, then into carbon, then into neon, then into oxygen, then silicon and finally iron, which cannot fuse any more. This causes the star to explode into a supernova, which is billions of times brighter than the sun. Stars that aren't massive enough will become neutron stars. Neutron stars are similar to white dwarfs, except for the fact that they are much denser and have a much stronger magnetic field. Neutron stars also compress protons and electrons together, which forms neutron stars. The core of a neutron star is so dense that they form strange matter, which is made up of strange quarks. If the star is very massive, it will first release a gamma ray burst, and eventually it becomes a black hole.

Types of stars
Red dwarfs are the most abundant type of star in the observable universe, because they burn at such a low temperature that their lifespan can last up to trillions of years.

More massive stars include yellow dwarfs and F type stars. These stars will have lifespans from 10 billion years to 30 billion years

The most massive stars are B type and O type stars. These stars burn at a high temperature have have a lifespan of a few million years.