I was reading about hash functions in crypto and a website had mentioned that they were collision free, which obviously isn't possible if there are infinite input values that are mapped to outputs of a finite length. So what happens in the event of a hash collision? How do crypto currencies overcome this problem?

Also, this is slightly off topic, but why can't a hash value be decoded? I mean if values are being mapped, to mapped to an output finite list of encoded values why can't you reverse engineer the process? It can't be truly random there has to be a method for which a hash function maps its values right?

Please let me know if I am using any terminology wrong or am completely mistaken in any assumptions I make in my question. I am just trying to learn so please let me know.