A car door latch functions by using a handle that is attached to an actuator arm on the inside of the door frame. When the handle is pulled, the arm pulls on the latch lever and releases it, letting the door open.
The door latch uses a small metal piece that is attached over a U-shaped bolt on the door frame. The latch is essentially a metal tongue that when the door is closed, slides back onto a spring-loaded swivel. This spring-loaded swivel lets the lever swing back over the U-shaped bolt it is lined up with, to allow it to close and stay closed when not in use. This is a safety precaution on all vehicles so that whenever the door handle is not physically being pulled, the door will stay closed.
Although the handle on a car will pull on the latch to let it be opened, other safety precautions can prevent the door from being opened. If the lock on the door is set then the handle will not be able to pull on the release arm connected to the lever, and the door cannot open. Although the locks on doors were originally manually set by pressing down the lock, they are typically controlled by electronic actuators in the car that can automatically engage or disengage the latch.