Data integrity helps to make sure if something is communicate and not tampered with in the mean while when transmission take place.
Checksums: Simply inserts the bytes within a request message or a file. If the checksums match the integrity is obtained. The weakness with the simplest form of checksum is that some times garbage can be added to create sums equal like
ABCDE == EDCBA
There are more enhanced checksums like CRC-32, Adler-32, which are designed to address the above weakness by considering not only the number of each byte but also its position.
Cryptography hashes: This uses a mathematical function to make a small result called message digest from the input message. Difficult to make false positives. Common hash methods are MD5, SHA etc.