Hash functions take an input, then runt them through the function equation, and the output is a unique “digital fingerprint” a unique collection of numbers and letters that represent the final output. A good hash function cannot be reverse engineered from the output to discover the input accurately.
Hash functions give us a unique digital fingerprint of each transaction that will forever stay on the blockchain. If anyone were to edit a previous transaction, it would change the digital fingerprint on their ledger, and all the other validators would recognize this and reject the change as consensus. This keeps Bitcoin’s ledger immutable, unchangeable, and secure.
Collision resistance is the likeliness that any two inputs would create the same unique hash output. The statistical probability of this is incredibly small with SHA256 because of how complex and long the outputs can be, but it is theoretically possible. Thats why they say it is collision resistant and not collision proof.