How does a surjection from $\pi_1(\Sigma_g)$ to a group $Q$ determine an element of $H_2(Q,\mathbb{Z})$? Let $\Sigma_g$ be a closed orientable surface of genus $g$ on page 36 of this paper. It is asserted that for a finite group $Q$, a homomorphism $\pi_1(\Sigma_g)\rightarrow Q$ determines an element in $H_2(Q,\mathbb{Z})$.
How does this work? This is especially confusing to me, since they don't even specify the action of $Q$ on $\mathbb{Z}$, and the homology group doesn't seem to include the data of $\pi_1(\Sigma_g)$ at all.
 A: Very generally, given a homomorphism $G\to H$ of groups, there is an induced homomorphism $H_n(G,\mathbb{Z})\to H_n(H,\mathbb{Z})$ on homology (here the actions of the groups on $\mathbb{Z}$ are trivial).  In your case, you have $G=\pi_1(\Sigma_g)$, $H=Q$, and $n=2$, giving a homomorphism $H_2(\pi_1(\Sigma_g),\mathbb{Z})\to H_2(Q,\mathbb{Z})$.  But $H_2(\pi_1(\Sigma_g),\mathbb{Z})=H_2(\Sigma_g,\mathbb{Z})=\mathbb{Z}$, so this is just a homomorphism $\mathbb{Z}\to H_2(Q,\mathbb{Z})$.  The element in $H_2(Q,\mathbb{Z})$ we are interested in is just the image of $1\in\mathbb{Z}$ under this homomorphism.
So to answer the specific points you were concerned about, the action of $Q$ on $\mathbb{Z}$ is trivial, and the special property of $\pi_1(\Sigma_g)$ used here is that we have a chosen class in $H_2(\pi_1(\Sigma_g),\mathbb{Z})$ whose image we can take.
(The paper describes this in topological terms: a homomorphism $\pi_1(\Sigma_g)\to Q$ gives you a map of classifying spaces $B\pi_1(\Sigma_g)\to BQ$, and then you are looking at the induced map on $H_2$ of these spaces.  But $B\pi_1(\Sigma_g)$ is just $\Sigma_g$, so there is a canonical class in its $H_2$ (the fundamental class), and we can take the image of this class in $H_2(BQ,\mathbb{Z})$.)
A: First of all notice that $\Sigma_g$ is obtained from a bouquet of $2g$ circles $B=S^1 \vee \dots \vee S^1$  by adding a unique two-cell $D$ via a certain gluing map $\varphi: \partial D  \to B$.
Let $X$ denote a CW-complex with the homotopy tipe of a $K(Q,1)$ (i.e. suppose that $\pi_1(X)=Q$ and $\pi_i(X)=0$ for $i \geq 2$) so that $H_*(Q, \mathbb{Z})=H_*(X, \mathbb{Z})$. Up to collapsing a maximal tree of the one-skeleton of $X$, one can suppose that the one-skeleton of $X$ is also a bouquet of circles. We will use the base points of these bouquets as base points of the various homotopy groups appearing.    
A group homomorphism $u: \pi_1(\Sigma_g) \to Q = \pi_1(X)$ gives a base point preserving map $B \to X$: for each circle $\gamma$ of $B$  we get a map $u(\gamma): (S^1, 1) \to (X, \text{base point)}$, and the collection of these maps descends to a map $f: B \to X$. 
Now, since $f\varphi: \partial D  \to X$ is  homotopically trivial, the map $f: B \to X $ estends to a map $\tilde{f}: \Sigma_g \to X$ and we can consider the map induced in homology $\tilde{f}_*: H_2(\Sigma_g, \mathbb{Z}) \to H_2(X, \mathbb{Z})= H_2(Q, \mathbb{Z})$. 
I guess that the desired element is given by $\alpha=\tilde{f}_*(\mu)\in H_2(Q, \mathbb{Z})$, where $\mu\in H_2(\Sigma_g, \mathbb{Z})=\mathbb{Z}$ denotes an orientation class of $\Sigma_g$. 
PS: notice that  $\alpha$ (only defined up to a sign if you don't choose an orientation) depends only on the homomorphism $u: \pi_1(\Sigma_g) \to Q$ since at each point the construction is essentially unique up to homotopy. 
