A login can be locked when:
Its password expires, or
The maximum number of failed login attempts occur, or
The system security officer manually locks it.
The system security officer can use sp_locklogin to manually lock or unlock a login. For example:
sp_locklogin "joe" , "lock" sp_locklogin "joe" , "unlock"
Information about the lock status of a login is stored in the status column of syslogins.
See sp_locklogin in Reference Manual: Procedures.