text: how does a star resist collapsing under its own gravitational attraction?   initially, the pressure from outward flowing photons created by nuclear fussion of hydrogen prevent the star from collapsing.  when hydrogen has been expended, other elements in turn are burned, although this process goes rather quickly.  what happens next depends on the total mass of the star.  if the mass is insufficient, the star cools, and becomes a brown dwarf.  electron repulsion holds these stars from further collapse.  if the mass is sufficient, then electrons are crushed into an associated proton, and create a neutron.  this causes a neutron star, and releases additional light and heat.  some stars stop here, but with sufficient mass, the neutrons are eventually crushed together, and a black hole forms.