The body of a retractable pen houses an ink tube held in place by a spring at the pen tip and a retraction mechanism at the other end. There are several types of retraction mechanisms that allow the user to toggle between retracting and extending the ink tube.
Each retraction mechanism consists of a button, a thrust piece that pushes against the ink tube and a toggle mechanism. The toggle mechanism usually consists of a round barrel with teeth of alternating height. Another spring attached to the button makes the barrel rotate with each click. When the short teeth are engaged, the pen tip extends. When the long teeth are engaged, the pen tip retracts. Each click alternates between retracting and extending the pen tip.
A push of the button pushes the ink tube out of the pen's body while advancing the toggle mechanism. The thrust piece pushes on the ink tube, holding it down, and the spring at the pen tip pushes up, which helps to hold the toggle mechanism in place. When the user clicks the button to retract the pen tip, the toggle mechanism advances again, and the spring at the pen tip pushes the ink tube back into the pen's body.