Let $Y$ be a $3$-manifold. Two maps $f,g \colon Y \rightarrow S^2$ are homologous if they are homotopic in the complement of a $3$-ball in $Y$.
At the beginning of Section 2.6 of Ozsváth and Szabó's first paper (arXiv:math/0101206v4), the authors identify the set of homology classes of maps $Y \rightarrow S^2$ with $H^2(Y;\mathbb{Z})$ in the following way: fixing a generator $\mu \in H^2(S^2;\mathbb{Z})$, the map sends the class of $f \colon Y \rightarrow S^2$ to the pull-back $f^*\mu$.
I do not see why this is a bijection. I understand that it follows from "elementary obstruction theory", but I do not know enough obstruction theory to see how. Could anyone give me some hints?
The point is that $S^2$ is the 3-skeleton of $\mathbb{C}P^\infty$ and $[X,\mathbb{C}P^\infty]\cong H^2X$ for any complex $X$. Thus $[X,S^2]\cong H^2X$ for any 2-complex $X$. These statements are usually derived from "elementary obstruction theory".
If we assume that the 3-manifold $Y$ is orientable, then we can equip it with a CW structure with a unique 3-cell, and then being homologous is the statement that two maps are homotopic on the 2-skeleton (we can without loss of generality remove the 3-ball from the interior of the top cell). Of course the above applies and identifies the homotopy classes of maps $Y_2\rightarrow S^2$ with $H^2(Y_2)\cong H^2(Y)$.