Java SE 5.0 introduced classes for locking called as Lock API. They are part of java.util.concurrent.locks package. Until then, only synchronized methods and synchronized blocks were available for locking.
A built-in lock called intrinstic lock or monitor lock is obtained on the object which is locked by synchronized method or block. This lock is acquired by the thread executing synchronized method/block and released when the thread leaves it. The intrinsic lock is released under the following scenarios:
the synchronized method/block execution is completed normally
there is an exception thrown which is not handled within the synchronized method/block