Lockouts occur, as noted, if there are multiple consecutive incorrect login attempts. This is to protect you from someone just trying to guess your account
The length of time the account is locked depends on the web site. After the lock out time expires, you will again have access to the account.
Why it got locked? Do you have any other users on your computer? Maybe someone was experimenting.