A ratchet and pawl is a mechanism used to restrict rotary motion to a single direction. The pawl blocks any moment in the opposite direction.

ratchet and pawl