Because of the new burst of energy, the envelope, while still a giant star, contracts slightly and heats up a little bit, as below. Eventually, even the helium fuel in the core runs out, having fused all the helium in the core to carbon and oxygen. The core contracts again, and the area around the core becomes hot enough to fuse helium in a shell . The envelope continues to expand, and it may join stellar wind that had been blown from its nucleus. The evolution of massive stars is a little bit different than the evolution of low to medium mass stars.
Massive stars become hot enough in the core to fuse carbon.
However, in massive stars, the fusion of carbon in the core does not occur smoothly. Instead you have carbon detonation. This means that the fusion occurs suddenly, like an explosion. The reason this happens is that the core is degenerate, and degenerate matter is incompressible, so when carbon fusion stars, the temperature increases, but the pressure cannot increase in response, and the pressure-temperature relationship does not work. The temperature increases further, and runaway fusion results.