TITLE: BRST cohomology
QUESTION [25 upvotes]: I am reading some work on Mirror Symmetry from Physics perspective,the physicists seem to use some aspects of BRST quantization and BRST cohomology.  What is BRST Quantization and BRST cohomology, in realm of Mathematics. More precisely, 
What are the BRST complexes, how do we get this cohomology, what is the relation (if any) of this cohomology theory to say de Rham or Cech cohomology. Where do the mathematicians use this theory. What is it in context of $N =2 $ Superconformal field Theory, most relevant for Mirror Symmetry.
I appreciate both physics and mathematical ideas.

REPLY [24 votes]: Stepping back from the 'oid and Theo's fascinating answer, I thought I would try to complement it -- after all, the title of my PhD thesis (PDF file) did contain the phrase BRST cohomology.  It also allows me to expand on my answer to this earlier MO question.
For the impatient let me start with a slogan:

BRST is symplectic reduction

Of course, like all slogans this is an oversimplification, but I hope that it gets the main point across.
Let's consider for definiteness a finite-dimensional symplectic manifold $(M,\omega)$ and a connect Lie group $G$ acting on $M$ via symplectomorphisms.  Let us assume, for simplicity, that for every $X \in \mathfrak{g}$, the Lie algebra of $G$, the fundamental vector field on $M$ is hamiltonian and moreover that the map $\mathfrak{g} \to C^\infty(M)$ is a Lie algebra homomorphism, where the Lie algebra structure on $C^\infty(M)$ is given by the Poisson bracket.  In other words, the action of $G$ gives rise to an equivariant moment mapping $\Phi: M \to \mathfrak{g}^*$.
Symplectic reduction is a procedure by which we go from $(M,\omega)$ to a lower-dimensional symplectic manifold $(\tilde M, \tilde \omega)$ and it consists of two steps:

we restrict to the submanifold $M_0 = \Phi^{-1}(0)$, i.e., the zero-momentum submanifold, and
we descend to the quotient $\tilde M = M_0/G$ with the induced symplectic structure $\tilde \omega$ defined by
$$ \pi^* \tilde \omega = \imath^*\omega $$
where $\pi: M_0 \to \tilde M$ and $\imath: M_0 \to M$ are the natural projection and embedding, respectively.

(This assumes for simplicity that $0$ is a regular value of the moment map and that $G$ acts on $M_0$ in such a way that the quotient is smooth.)
In the simplest case, BRST cohomology is a cohomology theory which yields $C^\infty(\tilde M)$ from $C^\infty(M)$.  It is the cohomology of the total differential of a double complex consisting horizontally of the Koszul complex which defines a resolution of $C^\infty(M_0)$ in terms of free $C^\infty(M)$-modules, and vertically of the Chevalley--Eilenberg complex computing the cohomology of the Lie algebra $\mathfrak{g}$ with coefficients in the $C^\infty(M)$-modules in the Koszul resolution.  The main theorem is the isomorphism
$$H^0_{\mathrm{BRST}}(C^\infty(M)) \cong C^\infty(\tilde M)$$
as Poisson algebras.
This admits a number of generalisations: to not-necessaarily finite-dimensional Poisson manifolds and where there is no group action but just a coisotropic distribution; what in the Physics literature goes by the name of first-class constraints, a nomenclature due to Dirac.
The real power of BRST cohomology lies in the fact that the BRST complex is a complex of Poisson algebras and the differential is an inner Poisson derivation.  This means that it is amenable to quantisation and that is the use to which it is put in the literature mentioned by the OP.
The problem is to quantise a constrained hamiltonian system $(M,\omega)$ whose reduced "phase space" is the symplectic quotient $(\tilde M, \tilde\omega)$.  This means that the physical dynamics are those in $(\tilde M, \tilde \omega)$ and hence that is the classical system one ought to be quantising.  Alas, this is usually difficult: firstly, quantisation is intrinsically difficult but also $(\tilde M, \tilde \omega)$ is usually geometrically complicated.  BRST gives a way to do this by quantising the usually simpler system $(M,\omega)$ and then take the quantum BRST cohomology:
$$
\matrix{C^\infty(M) & \stackrel{\mathrm{quant}}{\longrightarrow} & \mathcal{H}\cr
\downarrow & & \downarrow\cr
C^\infty(\tilde M) & \stackrel{\mathrm{quant}}{\longrightarrow} & \tilde{\mathcal{H}} \cr}
$$
where the horizontal arrows are quantisations and the vertical arrows are (zeroth degree) BRST cohomology: classical in the left and quantum in the right.
The virtues of the "north-east" path is that we get to quantise a simpler system and that symmetries are usually preserved.  In the Physics literature this goes by the name of "covariant quantisation".  This is particularly useful in the quantisation of the bosonic and NSR strings and their brethren.