Generally, without any external disturbance, cohesive forces of the materials in use will be sufficient to keep them together, since they all share the same inertial frame. But sure, to prevent soils from scattering around when moved around, worked with or perhaps due to air circulation, they can be contained in growing pots or similar containers that would additionally hold the soil due to surface tension.

Canadian astronaut Bob Thirsk holds plants while on board the ISSn in 2009. (Credit: Canadian Space Agency)
Adding water will only increase this cohesion because of increase in surface tension it would provide to the growth medium. So in general, there's no need to additionally "secure" the culture any more than you'd want to do in gravity. That soil isn't going anywhere unless it'll be eventually pushed out by growing roots, something that would happen in gravity just as well if you used too small pot when planting seeds or rooting cuttings.
Perhaps this is better seen than read about, so I suggest for example this video with astronaut Chris Hadfield performing a science experiment with a soaking wet washcloth. You'll appreciate water's surface tension at work in microgravity better than any words can describe:
When the plants are in racks however, they would also use reflective covers over their growth mediums since they're grown under artificial light and illumination doesn't come cheap without increasing by plants less well tolerated heat. For soils, they mostly use nutrition gels or soil substitutes (e.g. coco fibers with vermiculite for minerals, clay pellets,...). Biological soils are rare nowadays in hydroponic gardens for various reasons, from poor ability to contain water, root rot, to harboring pests and infections.