In its most basic form, a latch does not lock, it is simply a device that holds a door or other object closed. More intricate latches can be installed that close and lock a door.
Cam and Compression Latches
Two similar latches are the cam and compression latches. A cam latch works by turning a knob or grip, causing a metal bar or protrusion to be turned against the frame to restrict the movement of the door. Operating in a manner similar to a cam latch, the compression latch uses compression to hold the door to its frame.
A deadbolt latch is a step up from the simple latch, as it is a locking device. You may have a deadbolt latch on your exterior door for security. The deadbolt latch has a beveled bolt that fits into the door frame when the door is closed. It prevents the door from opening, even if the door knob is turned.
Tension and Draw Latches
When you want to pull two surfaces together and keep them closed, the tension or draw latch would be your best choice. As their name implies the two surfaces are drawn together and held by the latch. Old-style galoshes used this type of latch on a smaller scale. You hooked the latch over the buckle and then pulled the handle part over to lock it in place, effectively drawing the two sides of the boot together.
When you have a door that you routinely open easily but then have a hard time closing because your hands are full, what you need is a slam latch. Designed to work when the surfaces are slammed (gently or vigorously) together without damage to the latch, a slam latch does the same as other latches in keeping a door closed.
Door Knobs and Latches
If your door knob and latch closes the door and locks it, this is referred to as a dead latch. The complete set of door knob and latch comes in one of two sizes. Residential sets are 2 3/8 inches while commercial sets are 2 3/4 inches. If you need to purchase a set, either get one of the adjustable sizes or get the correct residential or commercial size.