Special machines similar to rotating presses(multi-ton thrust) are used. Tools (rolling dies) are placed on these machines referred to as wheels and are like large screws which are coming reproduce their profile on the workpiece. Thus profile + not + diameter, defines a rolling dies set.
Two rolling dies rotate in the same direction and pressure on the dies causes the material to follow the die pattern.
The metal is deformed and the diameter increases. The bottom of the thread is very cold worked and hardened.