Sometimes worn pins are replaced with new pins if the old pins become too short to reach the shear-line.
The shear-line is the thin line shared by the lock plug and its cylindrical housing. If a pin sits flush with the circumference of the plug it will allow lock rotation. Lock cylinders use different length pins in different combinations to create relatively unique key bitting.
Most keys have 5 cuts from bow to tip. If a key has 5 cuts, the lock has 5 pins