Deadbolts are generally used for security purposes on external doors in case somebody tries to kick the door in or use a tool such as a crowbar or a hammer and screwdriver etc. They are typically manipulated with a lock on the outside and either a lock or a latch on the inside. By the use of a latch bolt, a door can be closed without having to operate the handle.
Most doors make use of one or more fasteners to hold the door closed. Some doors, particularly older ones, will have a keyhole accompanying the lock. A lock is a device that prevents access by those without a key or combination, generally by preventing one or more latches from being operated.