user41513: What are similarities and differences between a "checksum" algorithm and a "hash" function? 
Can they be used instead of each other? Or their usage are different?
For example, for verifying the integrity of a text, which one is better to be used?

user63872: A checksum is an application of a hash function.
From wikipedia - cryptographic hash function:

A cryptographic hash... is a mathematical algorithm that maps data of arbitrary size to a bit string of a fixed size (a hash) and is designed to be a one-way function, that is, a function which is infeasible to invert.

From wikipedia - checksum:

A checksum is a small-sized datum derived from a block of digital data for the purpose of detecting errors which may have been introduced during its transmission or storage.

As an example of how hash functions and checksums are applied in bitcoin, consider how a bitcoin address is generated from a public key (for full details see this link):

By employing a hash function, the user's public key remains unknown until an address is spent from, so this keeps a user's funds safe in the case ECDSA is broken (see this question for further reasoning). 
Adding a checksum to the address ensures that a user will not lose coins due to a simple keying/copying error when submitting payments.

So, we can see that using a hash function allows the user to hide their public key (but easily confirm the address once we know the public key), while also retaining enough bytes in the address to ensure a very large address space. 
In contrast, the checksum is short (4 bytes), so obviously we could not use a checksum as the address (the address space would be far too tiny!). But a checksum works well to ensure the address is legitimate, the chance of making a keying error and still having a valid checksum is incredibly small- it is basically impossible in practise! Using the entire hash output as the checksum would work as well, but it would be overkill, and an inefficient use of space (instead of an extra 4 bytes, the address would basically double in size). 

user52021: Sometimes these terms are used more or less interchangeably.  Traditionally, a checksum is used to detect corruption and a hash is used to map large elements into slots randomly.  In Bitcoin-land we're often concerned with "cryptographic hashes"  which are hashes that have special security properties.
Things called checksums are usually designed to have certain uniformity properties that make them maximally likely to detect errors.  Things called hashes are usually designed to be very fast to compute and not be too non-uniform.  Things called cryptographic hashes are designed to make it difficult to compute a collision.
The security properties of cryptographic hashes often make them slower and less uniform than functions you would use for cases where the security isn't required.
Generally any function from any of the three groups could be used in any of the applications, the result would just not achieve the security, performance, or reliability that you'd get for using the right tool for the job.

41513: <p>What are <strong>similarities</strong> and <strong>differences</strong> between a <strong>"checksum"</strong> algorithm and a <strong>"hash"</strong> function? </p>

<p>Can they be used instead of each other? Or their usage are different?</p>

<p>For example, for verifying the integrity of a text, which one is better to be used?</p>
 63872: <p>A checksum is an application of a hash function.</p>

<p>From <a href="https://en.wikipedia.org/wiki/Cryptographic_hash_function" rel="nofollow noreferrer">wikipedia - cryptographic hash function:</a></p>

<blockquote>
  <p>A cryptographic hash... is a mathematical algorithm that maps data of arbitrary size to a bit string of a fixed size (a hash) and is designed to be a one-way function, that is, a function which is infeasible to invert.</p>
</blockquote>

<p>From <a href="https://en.wikipedia.org/wiki/Checksum" rel="nofollow noreferrer">wikipedia - checksum:</a></p>

<blockquote>
  <p>A checksum is a small-sized datum derived from a block of digital data for the purpose of detecting errors which may have been introduced during its transmission or storage.</p>
</blockquote>

<p>As an example of how hash functions and checksums are applied in bitcoin, consider how a bitcoin address is generated from a public key (<a href="https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses" rel="nofollow noreferrer">for full details see this link</a>):</p>

<ul>
<li><p>By employing a hash function, the user's public key remains unknown until an address is spent from, so this keeps a user's funds safe in the case ECDSA is broken (<a href="https://bitcoin.stackexchange.com/questions/3600/why-are-bitcoin-addresses-hashes-of-public-keys">see this question for further reasoning</a>). </p></li>
<li><p>Adding a checksum to the address ensures that a user will not lose coins due to a simple keying/copying error when submitting payments.</p></li>
</ul>

<p>So, we can see that using a hash function allows the user to hide their public key (but easily confirm the address once we know the public key), while also retaining enough bytes in the address to ensure a very large address space. </p>

<p>In contrast, the checksum is short (4 bytes), so obviously we could not use a checksum as the address (the address space would be far too tiny!). But a checksum works well to ensure the address is legitimate, the chance of making a keying error and still having a valid checksum is incredibly small- it is basically impossible in practise! Using the entire hash output as the checksum would work as well, but it would be overkill, and an inefficient use of space (instead of an extra 4 bytes, the address would basically double in size). </p>
 52021: <p>Sometimes these terms are used more or less interchangeably.  Traditionally, a checksum is used to detect corruption and a hash is used to map large elements into slots randomly.  In Bitcoin-land we're often concerned with "cryptographic hashes"  which are hashes that have special security properties.</p>

<p>Things called checksums are usually designed to have certain uniformity properties that make them maximally likely to detect errors.  Things called hashes are usually designed to be very fast to compute and not be too non-uniform.  Things called cryptographic hashes are designed to make it difficult to compute a collision.</p>

<p>The security properties of cryptographic hashes often make them slower and less uniform than functions you would use for cases where the security isn't required.</p>

<p>Generally any function from any of the three groups could be used in any of the applications, the result would just not achieve the security, performance, or reliability that you'd get for using the right tool for the job.</p>
