Latch

This latch can be opened from outside the door or from inside.
A latch is used to close a farm gate, but is also easy to open.
A lock and two latches on a trunk
This window latch can hold the window open or hold it closed.

A latch is a type of hardware that is used to join two objects together. A latch often keeps animals or wind from opening something. This could be a door or a gate. Unlike a lock, a latch is easy to open if you know how, so it can be convenient on a gate that needs to be opened often.