The water seals in traps are needed to prevent sewer gases from entering buildings, but because this water is exposed to the air, it is subject to evaporation over time in infrequently used floor drains, leading to the release of sewer gas into the environment.
Sometimes they are also installed in locations where the plumbing code does not require a primer because of a high probability of the trap drying out, but because of a nearby ignition source and the explosion hazard in the event that the trap did leak sewer gas.
Most designs require installation in an accessible location where periodic maintenance can be performed.
The simplest, typically for a floor drain's trap, is simply a connection from a nearby sink's drain so that when the sink is used, some of the water flow is diverted into one or more traps.
[1] Several manufacturers produce laundry faucets with a built-in trap seal primer outlet.