All stars shine through heat generated by nuclear reactions in their cores. These reactions heat all stars up and prevent them from shrinking. When nuclear fuel is exhausted stars start to contract. Smaller stars become white dwarfs or Neutron stars. When stars are very massive then after their nuclear fuel is used up nothing stops them shrinking and they become Black holes. At least early 21st Century astronomers expect these stars to become black holes.