SHA-256 is a cryptographic hash function. A cryptographic hash function has a few key properties. It takes an input, and produces an output of a fixed length-all SHA-256 outputs are 256 bits long, in a deterministic way-a given input will produce the exact same output every time, and in an unpredictable way-the slightest change to an input yields an entirely different output, such that it is infeasible to craft a desired output or calculate an input based on the outputs.
The Bitcoin protocol uses SHA-256 to derive transaction IDs (txids), block hashes, addresses, and Merkle trees. Occasionally, SHA-256 is applied twice, as in the case of txids.