The primary difference between door locks and door latches is that locks require a key to open the door from the inside, but a latch does not. As the name implies, a door lock ensures that your door is locked, while for latches, the door may be closed but definitely not locked.
Door latches are a general type of latch used for keeping doors and gates closed. They can be in the form of a sliding bolt that prevents the door from swinging open or a hook for maintaining a closed position for both sliding and swinging motions.
An example of a typical door latch is a doorknob. This type is commonly used for architectural purposes. It is composed of a latching mechanism, a locking mechanism, and two knobs on the interior and exterior sides.
The latch is a spring and bolt-type mechanism activated by turning the knob on either side of the door.