Through a mathematical algorithm, a large amount of data is converted to a smaller amount of data, which represents a hash.
The same data will always result in the same hash, but modifying the data by even one bit will completely change the hash. It is virtually impossible that two slightly different messages will have the same hash.