There is a security setting in Site Settings that sets the number of failed login attempts that triggers account lockout. The default is 5, so if you try to login 5 times in a row with the wrong password your account can get locked. You can set a higher number, and its also wise to create more than one login with admin role so you can unlock accounts by logging in as the alternate admin.
But if you don't have an alternate login and you lock yourself out the only way to fix it is directly in the database.
How to access the database varies by which kind of database you are using (MS SQL, MySql or others) and by hosting company.
Hope it helps,
Joe