How long does it take to crack a password by brute force
Perhaps your teacher was talking about some system where the format of passwords is restricted (e.g., where they can't be longer than whatever number of characters allows a typical computer to try all combinations in 21 days).  Or perhaps they were talking about some specific kind of password, such as words from the dictionary, maybe with c0mm0n m0d1f1c4t10n5.

In general, it's impossible to give a limit because passwords could be arbitrarily long. Indeed, even without needing crazy-long passwords, there are $62^{10}\approx 10^{18}$ possible ten-character passwords that can be made from numbers and upper-case and lower-case letters.  If you can try a billion passwords a second, it'll still take you a billion seconds to try all of these passwords, and that's about 32&nbsp;years.

Note that the above discussion ignores the fact that, in reality, we don't guess passwords but, instead, guess strings that have the same hashes as passwords.  At the level we're talking about here, though, this doesn't make any real difference.