How do annihilation and creation operators act on fermions?

The basic procedure is as follows: $$ a_r(\mathbf{k}_1) |\mathbf{k}_2,s\rangle = a_r(\mathbf{k}_1) a_s^{\dagger}(\mathbf{k}_2) |0\rangle = \{a_r(\mathbf{k}_1), a_s^{\dagger}(\mathbf{k}_2) \}|0\rangle = |0\rangle (2\pi)^2\omega_1 \delta(\mathbf{k}_1-\mathbf{k}_2) \delta_{rs} , $$ where $|\mathbf{k}_2,s\rangle$ is assumed to be a fermion state. For an anti-fermion state one would use the $b$-operators, instead. The reason why one can express this in terms of the anti-commutator is because $ a_r(\mathbf{k}_1) |0\rangle = 0$. The detail of the final expression depends on the particular anti-commutation relation that you use. Here I've used a Lorentz convariant version.


If you need to compute $$ \int \frac{d^3 p}{(2\pi)^3} \sum_s ( {a^s_ {{\vec{p}}}}^\dagger a^s_ {{\vec{p}}} - {b^s_ {{\vec{p}}}}^\dagger b^s_ {{\vec{p}}} ) |\vec{k},r \rangle, $$ you will need ${a^s_ {{\vec{p}}}}^\dagger a^s_ {{\vec{p}}}|\vec{k},r \rangle$ and ${b^s_ {{\vec{p}}}}^\dagger b^s_ {{\vec{p}}} |\vec{k},r \rangle$. Since you are dealing with Dirac fields, you get these using the anti-commutation relations (with the proper normalization factors - and I don't know which convention you are using): $$ \{{a^s_ {{\vec{p}}}},{a^r_ {{\vec{q}}}}^\dagger\}=\delta_{sr}\delta(\vec{p}-\vec{q}),\\ \{{b^s_ {{\vec{p}}}},{b^r_ {{\vec{q}}}}^\dagger\}=\delta_{sr}\delta(\vec{p}-\vec{q}),\\ \{{a^s_ {{\vec{p}}}},{b^r_ {{\vec{q}}}}^\dagger\}=\{{b^s_ {{\vec{p}}}},{a^r_ {{\vec{q}}}}^\dagger\}=0.\\ $$ and knowing that ${a^s_ {{\vec{p}}}}|0\rangle={b^s_ {{\vec{p}}}}|0\rangle=0$.

It follows the answer with the same procedure @flippiefanus used.