Which algorithm to use
SHA-256 is the everyday choice for checksums, signatures and data integrity. SHA-384 and SHA-512 give longer outputs. MD5 and SHA-1 are broken for security purposes but still common for quick checksums and legacy systems.
Checking a download
Many downloads publish a SHA-256 checksum. If the hash of the text you have matches the published one exactly, the content is identical — one changed character gives a completely different hash.