I'm reading about planetary nebulae and how they are formed, but as is sometimes the case, I've gotten a little confused. So, I have a star, let's say 5 times the mass of the sun. At some point, when helium in the core has run out, the new core now consists primarily of carbon and oxygen, which cannot fuse in this medium mass star.
Now, In the meantime, a hydrogen and helium shell has been established outside the core. So when the helium shell starts to burn, it expands the distance between the two shells due to the contraction of the core. Then, at some point, the space between them is so huge, that the temperature at the hydrogen shell is not sufficient to keep the process going, and it "turns off". This makes the star expand greatly, because of only one burning shell, and that it makes a large convective zone where material from the core and such can be transported out into the surface.
So now the helium shell is burning out, and the hydrogen shell is getting closer to the core, i.e. higher temperature (due to the gravitational pull), and it re-ignites and start producing helium again, which then again can start burning at some point.
So, this results in the so-called thermal pulse as far as I understand.
My question is: What is it that "throws" the material out into space and makes planetary nebulae ? Is it the thermal pulse, that somehow bounces some of the material out every time it expands (And side question: Does it keep doing this until there is only the carbon-oxygen core left?), or is it radiation from the core that pushes some of it out, or something entirely different ? In short: I'm not sure what it is that exactly throws material out from the star !