In a theory with a given gauge symmetry (redundancy) we are interested in what our actual non-redundant physical states are. These can be found with the help of a special kind of cohomology, called BRST cohomology.
The BRST operator is used to identify physical states. These are to be contrasted with unphysical states that only appear as convenient computational tools.
A physical state satisfies
$$ Q_{BRST} |\Psi_{phys} \rangle = 0.$$
However, there are also unphysical states that satisfy this condition trivially, because the BRST charge satisfies $Q_{BRST}^2=0$. Every state that can be written in the form $|\xi\angle = Q_{BRST} |\Psi \rangle$ yields zero when we act on it with $ Q_{BRST}$ because $Q_{BRST}^2=0$.
These states are non-physical, because they have norm zero: $\langle \xi |\xi\angle=0$.
A state that can be written as $|\xi\angle = Q_{BRST} |\Psi \rangle$ is called BRST exact. A state that satisfies $ Q_{BRST} |\Psi_{phys} \rangle = 0$ is called BRST closed. From the discussion above, we know that the BRST exact states are a subset of all BRST closed states.
We can add to any physical state an BRST exact state without changing anything:
$$ |\tilde{\Psi}_{phys} \rangle = |\Psi_{phys} \rangle + Q_{BRST} |\Psi \rangle .$$
The additional term drops out of every observable, because $Q_{BRST}^2=0$:
$$ \langle |\tilde{\Psi}_{phys} | \hat O |\tilde{\Psi}_{phys} \rangle = \langle {\Psi}_{phys} | \hat O |{\Psi}_{phys} \rangle . $$
After this observation we are in the position to identify the true, non-redundant physical states.
A physical state is an equivalence class, i.e. the set of all states that we can get from a given state by adding BRST exact states to it. It makes sense to identify all such states with each other, because as we have seen above, they all describe exactly the same physics.
The set of all such equivalence classes is called the BRST cohomology.
This process of "factoring out redundant things" by defining equivalence classes is, of course, the usual procedure of building a quotient space.
The truly physical Hilbert space, i.e. the set of all non-redundant truly physical states can then be defined as
$$ \mathcal{H}_{phys} = \frac{\text{Ker}Q_{BRST}}{\text{Im}Q_{BRST}} . $$
See section 5.3 in this paper.
Another important role is played be deRham cohomology in electrodynamics. (See Gauge Fields, Knots and Gravity by John Baez, Javier P Muniain)