Credential stuffing is an automated attack that replays username and password pairs leaked from other sites. It works because people reuse passwords: a pair stolen from a forum breach often opens the same person's mail, shop or code-hosting account.
It is easy to confuse with two neighbours. The OWASP Credential Stuffing Prevention Cheat Sheet separates them like this:
Attack What is tried Typical signal
Brute force many passwords against one account many failures for one username
Password spraying one weak password against many accounts the same password across usernames
Credential stuffing leaked pairs from another breach, one pair per account low failure rate per account, many accounts, often a high success rate
That last column is why per-account lockouts do little against stuffing: each account may see a single attempt, and some of those attempts use the correct password.
The best single defence
The cheat sheet is direct about it: multi-factor authentication "is by far the best defense against…