In a star like the Sun, nuclear fusion turns hydrogen into helium. In very large stars, helium gets turned into oxygen, and so on. The star fuses increasingly higher mass elements, up through the periodic table until a core of iron and nickel is produced. Fusion of iron or nickel produces no net energy output, so no more fusion can take place. But, the collapse of the core is so rapid (about 23% of the speed of light) that a huge shock wave is produced. The extremely high temperature and pressure lasts long enough for a brief moment when the elements heavier than iron are produced. Depending on initial size of the star, the remnants of the core form a neutron star or a black hole.