From the magical perspective, demons (and other being beyond mortals) are kept — most often, imprisoned — in magical crystal bulbs.
The bulbs are about a size of a tennis or ping-pong balls — somewhere in between those two sizes. They are comfortably held by one held, though holding several bulbs in one hand is cumbersome.
When a bulb is held in a hand, the owner of the hand feels tingling, like if something trying to get into the skin.
The bulbs are fragile. If they are thrown against a wall, or dropped to a hard floor, they are smashed, and the content of it is released.
Certain magical powers are required to capture a demon into such a bulb. Common mortals or even celestials can't do that; some gods, however, can (not that they would do it). Yanwang is given powers to hunt demons and capture them in bulbs.
If you want to know the meaning of different colours of the bulbs, you must visit the Makipedia’s page about them.