The Steenrod square is an example of a cohomology operation. Cohomology operations are natural transformations from the cohomology functor to itself. There are a few different types, but the most general is an unstable cohomology operation. This is simply a natural transformation from $E^k(-)$ to $E^l(-)$ for some fixed $k$ and $l$. Here, one regards the graded cohomology functors as a family of set-valued functors so the functions induced by these unstable operations do not necessarily respect any of the structure of $E^k(X)$.
Some do, however. In particular, there are additive cohomology operations. These are unstable operations which are homomorphisms of abelian groups.
In particular, for any multiplicative cohomology theory (in particular, ordinary cohomology or ordinary cohomology with $mathbb{Z}/2mathbb{Z}$ coefficients) there are the power operations: $x to x^k$. These are additive if the coefficient ring has the right characteristic. In particular, squaring is additive in $mathbb{Z}/2mathbb{Z}$ cohomology.
Given an unstable cohomology operation $r: E^k(-) to E^l(-)$ there is a way to manufacture a new operation $Omega r: tilde{E}^{k-1} to tilde{E}^{l-1}(-)$ using the suspension isomorphism (where the tilde denotes that these are reduced groups):
$E^{k-1}(X) cong E^k(Sigma X) to E^l(Sigma X) cong E^{l-1}(X)$
This is quite straightforward and is a cheap way of producing more operations. When applied to the power operations it produces almost nothing since the ring structure on the cohomology of a suspension is trivial: apart from the inclusion of the coefficient ring all products are zero.
What is an interesting question is whether or not this looping can be reversed. Namely, if $r$ is an unstable operation, when is there another operation $s$ such that $Omega s = r$? And how many such are there? Most interesting is the question of when there is an infinite chain of operations, $(r_k)$ such that $Omega r_k = r_{k-1}$. When this happens, we say that $r$ comes from a stable operation (there is a slight ambiguity here as to when the sequence $(r_k)$ is a stable operation or merely comes from a stable operation).
One necessary condition is that $r$ be additive. This is not, in general, sufficient. For example, the Adams operations in $K$-theory are additive but all but two are not stable.
However, for ordinary cohomology with coefficients in a field, additive is sufficient for an operation to come from a stable operation. Moreover, there is a unique sequence for each additive operation. This means that the squaring operation in $mathbb{Z}/2mathbb{Z}$ cohomology has a sequence of "higher" operations which loop down to squaring. These are the Steenrod squares.
The sequence stops with the actual squaring (rather, becomes zero after that point) because, as remarked above, the power operations loop to zero.
One important feature of these operations is that they give necessary conditions for a spectrum to be a suspension spectrum of a space. If a spectrum is such a suspension spectrum then it's $mathbb{Z}/2mathbb{Z}$-cohomology must be a ring. That's not enough, however, it must also have the property that, in the right dimensions, the Steenrod operations act by squaring. (Of course, this is necessary but not sufficient.)