The database engine uses intent locks to protect placing a shared (S) lock or an exclusive (X) lock on a resource (lower in the lock hierarchy). Intent locks are named thus because they are acquired before a lock at the lower level and therefore signal the intent to place the locks at a lower level.
Intent locks serve two purposes:
They prevent other transactions from modifying a higher-level resource in a way that would invalidate the lock at the lower level.
They improve the efficiency of the database engine in detecting lock conflicts at a higher level of granularity.