Database locks are used to manage concurrent access and maintain data integrity when multiple users try to access the same data simultaneously. Locks prevent conflicts like lost updates or inconsistent reads by serializing access to shared resources. They're not meant for security (protecting from attacks) or system maintenance.