Dies are the cutting tools used for making and repairing threads on the outside of circular items like shafts and bolts.
Dies are metal slugs, often in a round shape but hex-shaped ones exist, and nothing presents other shapes like squares from being used.
A die is used in a die-holder, and is clamped into place with one or more set-screws. There are three or more cutting surfaces, and an equal number of spaces for swarf removal.
The die is rotated over a suitably-sized shaft and cuts a thread-form into the component. Small threads can be cut by hand, but larger threads may require machinery or arms like Popeye.
Technique is important - a cutting tool will remove material, which has to go somewhere. Normally the tool is backed-off several times a rotation to "break the chip" and avoid long wiggly chips of swarf getting in the way. Use of the correct lubricant helps too.
The matching tool for cutting internal threads is a Tap although both internal and external threads can be cut by a skilled lathe operator too.
Dies can also be used to repair damaged threads, where the thread has been impacted or malformed by wear or pressures. This is called "chasing" a thread and can be the difference between reusing a part and replacing it.