Notice the chain drive, driving the gearing.
The head is moved up and down by a cam driving a rod attached
to the head. The rod and head are weighted
to make the head come back down.
The arms are moved by the two gears under the arms, moving
pawls attached to the
arms, moving them up . As the gears turn further, the pawls then swings the arms down.