I have a somewhat clear picture how (on the molecular level) a gas turns into a liquids as it cools. When a gas has a certain temperature, its molecules on average have a high enough kinetic energy so that electromagnetic interactions cannot hold the molecules together and they are essentially free. When the gas cools, the kinetic energies are smaller and thus electromagnetic interactions between molecules start to pull the molecules together and the process of turning into a liquid begins. As more molecules lose kinetic energy, initially small numbers of molecules start to cluster up, forming "lumps" that continue growing as more molecules gather up into these clusters. I believe this process is called "nucleation".
I found this video that helps visualize the effect:
But how does the reverse take place? Let's say I'm boiling water. I have a textbook that specifically states:
During nucleation, small droplets of liquid form in gases or gas bubbles form in water as it starts to boil.
As I heat water, the average kinetic energies of the molecules increase. How does nucleation create bubbles in this situation? I understand that a bubble is a "pocket" of gas inside a liquid. If nucleation works the same way in the process of liquid turning into a gas as it works in a gas turning into a liquid, by analogy there should be some "lumps" of gas forming inside the liquid. But what would hold these gas "lumps" together as the molecules in the gas have a higher kinetic energy as the molecules around them (that are still part of the liquid)? And how do these molecules with higher energy "find" each other to start forming clusters/bubbles? Or do I have a completely wrong visualization as to how bubbles form?