I just want to expand on Anders’s otherwise great answer, because I think based on the text of the question this paragraph is more what you're asking for:
There are doubtless other forces keeping cumulus clouds sharp, like the upper boundary often corresponding to the top of an upwelling convective flow into drier air and hence having a strong vapour gradient, and the cloud base being set by temperature, pressure and the dew point.
What the layperson needs to understand about a cloud, is that it is not like a rock with a defined set of grains/crystals in a fixed configuration. It is more like a river or a waterfall. Stuff is coming in one end and going out the other.
At the bottom you have moist air coming upwards, where the water inside is fully vaporized and so is transparent. But the pressure is dropping and so is the temperature, and at a particular virtual boundary which is the flat bottom of the cloud, this vaporized water condenses into little droplets. Those droplets are visible now.
All of the little droplets that you are seeing in the cloud are drifting, and on average they are drifting upwards.
Partly this is driven by outside factors, different masses of air moving across the landscape collide and one of them shifts upwards while the other one burrows underneath. But it is also self-sustaining. As a consequence of condensing, droplets release heat which warms the air which expands it. The warm air rises and drags the droplet with it upwards. Because the flows involved are way slower than the speed of sound, the air behaves approximately as an incompressible fluid. That just means that if there is this sudden updraft from the condensation warming the air, then air gets sucked in from the bottom to prevent a vacuum. (Incompressible also means not expandable, the vacuum can be interpreted as “stretching out the air” and at lower velocities air doesn't like to stretch.)
Eventually the droplet leaves the moist air that it is in. If it leaves out of the sides of the cloud, or the bottom, it may re-evaporate. On the other hand if it leaves out of the top of the cloud, which usually requires some pretty considerable convective wind transport, then it may get to the upper atmosphere where it can spontaneously freeze into “diamond dust”, tiny little flecks of supercooled ice. These are cirrus clouds, and they look a lot more fuzzy and flowy. A cumulus cloud that does this with those strong convective currents is a cumulonimbus cloud, a rain cloud. They have a characteristic anvil-like shape from the diamond dust top spreading out while the bottom is so firm and solid. (And the rain comes of course from the super-cooled ice crystals coming back down into the cloud, growing into big snowflakes, falling out of the cloud, and melting into raindrops.)
If you've been out on a foggy day then you have walked around in a cloud before, they do not have extremely sharp boundaries when you are up close in person. But, these very common cumulus clouds have this distinctive flat bottom and puffy top because those represent properties of the surrounding air where the droplets are appearing and disappearing. The bottom is flat because the dominant temperature and pressure gradient is vertical, the top is poofy with a sharp-looking boundary because you are looking at this boundary where this moist air mass from below collides with a dry air mass which it is pushing, roiling, bubbling into. The droplets at the one boundary are either turned away or evaporated into the dry air, the droplets at the other boundary are formed and are pulling more moist air up after them.
that prevent it from spreading
having seen and even made quite a few cloud time lapses in my time, I question where this is really the case. Over longer time scales, depending on atmospheric condition clouds can be quite fluid, and in some cases "evaporate" off the top or sides even as more moisture "condenses" as a replacement. $\endgroup$