A hash is a deterministic, fixed-size fingerprint of arbitrary input, produced by a one-way function that is infeasible to invert.
A hash function takes input of any size — a password, a file, a container image, a commit — and produces output of fixed size. SHA-256 always returns 256 bits, whether the input is one byte or one terabyte. The output is called a digest, a hash value, or a fingerprint. The function is deterministic: the same input always produces the same output, byte for byte, across machines and years.
Two properties define it. First, it is one-way: given the digest, you cannot feasibly recover the input. Second, it is collision-resistant: finding two different inputs that produce the same digest is computationally infeasible for a modern algorithm. These two properties are what make hashes useful for integrity, storage, and identity — and what make them break the moment the underlying algorithm weakens.