A cam & follower is a machine consisting of an angled cam (attached to a shaft), which pushes a flat rod, called the follower, up & down. The main function of a cam and follower is to convert rotary motion into reciprocating motion

Note that the cam (the rotating gear) is always an input gear i.e. the cam drives the follower but the follower cannot rotate the cam.