They go by many names … machine heads, tuning pegs, tuning keys.
But no matter what you call them, those little knobs play a huge role in how your guitar or bass performs.
The reason your instrument has tuning keys in the first place is to give you the ability to easily adjust string tension.
A single tuning peg consists of a cylinder that sits in a pinion gear with a worm drive connecting them. By threading the string through the cylinder, you can tighten or loosen it by turning the tuning knob.