There are two basic approaches, first you have the ultrasonic foggers which generate a mist of fine water droplets, as the mist is cold, unlike steam, it will tend to sink and the result is pretty similar to using dry ice. These rely on being immersed in water so, as mentioned, some care it needed to keep the water contained.
The second main option is the miniature smoke generators used in things like model railways, these work by dropping a 'smoke fluid', either an oil or a water soluble compound like glycerol onto a heating element. Unsurprisingly the oil based one behave more like smoke and the water based ones more like steam. These tend to use quite small volumes of the fluid so you don't have a lot of liquid sloshing about but they do generate a certain amount of heat.
The model train type generators are also pretty compact and are designed with fitting in to props and modes in mind and because they heat the fluid the resulting 'smoke' behaves more like real smoke or steam than the cold mist from ultrasonic foggers.