> Do databases store the hash of the password or not? And if they do so, can the thing I wrote above happen?

Yes, and perhaps, but not likely. However, it is usually easier to find the original password rather than a collision. With a strong hash function, it is unlikely that you find another string with the same hash as the string 'hello', but you can quickly verify whether the hash really matches 'hello'.

Even strong key-derivation functions that run on the server have to use few enough rounds to handle a number of users, so they would usually allow an attacker to make several (or hundreds or even thousands) of guesses per second. When a salt is used, each user's hash has to be attacked individually. Nevertheless, if the password is e.g. on a list of top 1000 passwords (which [can be over 90% of them][1]), like 'hello', it will fall in a matter of seconds.

  [1]: https://xato.net/passwords/more-top-worst-passwords/