I know that $\pi_2(S^1)=0$ since $S^1$ has $\mathbb{R}$ as universal cover, which is contractible. However, I have a map $S^2\to S^1$ that I can't intuitively see why it is nullhomotopic (it has to be, since otherwise it would represent a nontrivial element of $\pi_2(S^1)$).
Take $S^2$ to be the standard sphere centered at the origin of $\mathbb{R}^3$. Project onto the $XY$-plane by $p_1: (x,y,z)\mapsto (x,y,0)$. Then, do the same with the disc obtained, $p_2:(x,y,0)\mapsto (x,0,0)$. Now we have an interval, that we can send homeomorphically (say by $h$) to $[0,1]$. Now, I can choose non-nullhomotopic maps $[0,1]\to S^1$, such as the quotient map $q$ (not nullhomotopic because it represents a generator of singular homology) or $\phi(t)=e^{2\pi i t}$ (not nullohomotpic because it represents a generator of the fundamental group).
All the maps are continuous. The resulting map $f=q\circ h\circ p_2\circ p_1$ (or $g=\phi\circ h\circ p_2\circ p_1$) should be nullhomotopic, but I can't figure out a homotopy or a geometric intuition of how is that possible, since what I see is that in the end we're just performing the classical loop around $S^1$, which is not nullhomotopic.
You claim that $q : [0,1] \to S^1$ is not nullhomotopic. But it is. Define $h : [0,1] \times [0,1] \to S^1, h(s,t) = q(st)$. Then $h(s,0) = q(0)$ which is constant and $q(s,1) = q(s)$.
You misunderstanding comes from the fact that the closed path $q$ is a generator of $\pi_1(S^1)$. But for fundamental groups we consider homotopies of closed paths which keep the endpoints $\{ 0, 1 \}$ of $[0,1]$ fixed. This kind of homotopy is a very special one. For maps $S^2 \to S^1$ we are allowed to use arbitary homotopies. Even if we require that some basepoint of $S^2$ is kept fixed under homotopies ("pointed homotopies" ), we get the same result: All pointed maps are pointed homotopic to the constant pointed map.