In stars with a mass of 1.4 times the mass of the sun or under, the carbon-oxygen core isn't hot enough to continue fusing so it contracts under its own weight until the electrons exert enough pressure to stop it collapsing anymore. Then a hot dense white dwarf is left over.