Understanding generators of cohomology groups. Consider the following $CW$ complex structure on $\mathbb{R} P^2$. 

where $$H^i (\mathbb{R} P^2, \mathbb{Z}_2) \cong \begin{cases} \mathbb{Z}_2 & \text{if} \hspace{2mm} i=0,1,2 \\
0 & \text{otherwise} \end{cases} $$
Let $\alpha \in H^1(\mathbb{R} P^2, \mathbb{Z}_2)$ be the generator. 
Since $\alpha \in H^1(\mathbb{R} P^2, \mathbb{Z}_2)$ is a generator it is represented by $$ \phi: C_1(X) \to \mathbb{Z}_2$$
where $\delta \phi =0$ and $\delta(e)=1$ where $e$ represents a generator of $H_1( \mathbb{R} P^2, \mathbb{Z}_2 )$. 
For $\alpha$ to be a generator it must be a cocycle which is not a coboundary. For the cocyle condition we must have $\delta \phi =0$. 
However, I am not sure why $\phi$ must send a generator of $H_1(\mathbb{R}P^2)$ to $1$ in order for $\alpha$ to be a generator of the cohomology group. 
The overarching question I think is ; How are generators of the homology group related to the generators of the cohomology group? 
 A: 
How are generators of the homology group related to the generators of the cohomology group? 

For any topological space $X$, there exists an isomorphism $h : H^1(X; G) \cong \hom(H_1(X; \Bbb Z), G)$. Thus given generators $e_1, e_2, \cdots, e_n$ of $H_1(X; \Bbb Z)$, one can dualize to get generators $\alpha_1, \alpha_2, \cdots, \alpha_n$ of $H^1(X; G)$ where $\alpha_i$ is the cohomology class of the cycle $C_1 \to G$ which sends $e_i$ to $1$ and all other $e_k$'s to $0$.
In particular, if $X = \Bbb{RP}^2$, $e_1$ the generator of $H_1(\Bbb{RP}^2; \Bbb Z)$, then $H^1(\Bbb{RP}^2; \Bbb Z/2)$ is generated by the dual element $\alpha_1$ representing the cocycle sending (a representative of) $e_1$ to $1$.

The map $h$ above is given at the chain level by sending a cocycle $\varphi: C_1 \to G$ to the quotient $Z_1/B_1 \to G$ obtained from restricting $\varphi$ to $Z_1 \subset C_1$ and noting that it descends to the quotient because $\varphi|_{Z_1}$ vanishes on $B_1$. This resulting map is an element of $\hom(H_1(X; \Bbb Z), G)$. In general, one can define the map $h : H^n(X; G) \to \hom(H_n(X; \Bbb Z); G)$ like this. The universal coefficient theorem says we have the split short exact sequence
$$0 \to \text{Ext}^1(H_{n-1}(X) ; G) \to H^n(X; G) \to \hom(H_n(X; \Bbb Z); G) \to 0$$
For $n = 1$, $H_0(X)$ is free because it's free abelian on connected components of $\Bbb Z$. Thus, we have established the isomorphism above.
