These are most similar to those seen in the movies where a cloth or bandana is used. You can do it that way but there are numerous specially-designed gags that have unique features specifically for bondage or BDSM role-play scenes.
These include the so-called ‘fornophilic gag’ that you may have seen in power-play porn. These are designed to objectify the wearer as the gag has some kind of device attached, for example a dildo or vibrator, or a feather duster. Other common styles are the tape gag, muzzle gag and panel gag.