Locks are used in distributed systems to coordinate access to shared resources and ensure consistency. There are different types of locks like read/write locks that can be granted. A distributed lock manager implements locking and allows processes to acquire locks on resources in a hierarchy. This prevents issues like lost updates and deadlocks. Examples of distributed lock managers include Chubby, ZooKeeper and Redis.