There are precisely two: $S^2 \times S^1$ and a twisted product $S^2 \widetilde \times S^1$.
Suppose $M$ is closed, connected, with fundamental group $\Bbb Z$. Then it must be prime (by Poincare and because $\Bbb Z$ is indecomposable under free product), but not necessarily irreducible (meaning that every embedded 2-sphere bounds a 3-ball).
Indeed, it can't possibly be irreducible: consider $\tilde M$. It has trivial fundamental group, and because $M$ is irreducible, has $\pi_2 M = 0$ by the sphere theorem (which states that if $M$ is orientable, some nontrivial element of $\pi_2 M$ is represented by an embedded sphere). (If $M$ here is not orientable, pass to the oriented double cover.) Because $\Bbb Z$ is infinite, $\tilde M$ is not compact, so has $\pi_3 = H_3 = 0$; the first equality by Hurewicz and the latter by noncompactness. Inductively by Hurewicz we see that $\pi_n = 0$ for all $n$. So $M$ is aspherical, and hence a $K(\Bbb Z,1)$. But this would imply that $$\Bbb Z/2 = H_3(M;\Bbb Z/2) = H_3(S^1;\Bbb Z/2) = 0!$$
So $M$ is prime but not irreducible. We now follow an argument from Hatcher's 3-manifolds notes.
Because $M$ is prime, any embedded sphere either bounds a ball or does not separate $M$. But because $M$ is not irreducible there is some embedded sphere that does not bound a ball. So there is an embedded, non-separating, 2-sphere in $M$. Because $S^2$ is simply connected, any line bundle (which are in bijection with $H^1(X;\Bbb Z/2)$) over it is trivial. In particular, the normal bundle to any $S^2$ in $M$ is trivial.
So embed this separating 2-sphere, which extends to an embedding of $S^2 \times I$. Pick a curve that goes from one side of the thickened $S^2$ to the other (such a thing exists by the non-separating assumption); thicken it to get an embedded $I \times D^2$, whose ends are glued to each side of the $S^2$. More precisely, we can glue these together by a map $\varphi: \{0,1\} \times D^2 \to \{0,1\} \times S^2$ with $\varphi(0,\cdot) \subset \{0\} \times S^2$ and similarly with $\varphi(1,\cdot)$. In different language, I'm attaching a 1-handle to $S^2 \times I$. The results depend only on whether or not $\varphi$ preserves orientation on both components. (That is, if it preserves orientation on both components, or reverses orientation on both components, you get one manifold; if it preserves orientation on one component but reverses orientation on the other, you get a second, distinct manifold). Call the results $X_0$ and $X_1$, where $X_0$ is the orientable one; $X_0$ is what you get if $M$ is orientable, and $X_1$ if it's not.
The boundary of $X_i$ is $S^2$; because this $S^2$ does separate $M$, it bounds a ball on the other side. There is only one way up to homeomorphism to glue a ball onto a manifold with boundary $S^2$. So we get that $M$ is one of either $M_0$ or $M_1$, where these are the $X_i$ with that ball capped off.
To finish, we just need to find two manifolds with such a decomposition. $S^2 \times S^1$ is one, where here the embedded $S^2$ is just $S^2 \times \{*\}$; and $S^2 \widetilde \times I = (S^2 \times I)/(x,0) \sim (-x,1)$ is another (again, pick, say, $S^2 \times \{1/2\}$.) The former is orientable; the latter is non-orientable. So $M_0 = S^2 \times S^1$ and $M_1 = S^2 \widetilde \times S^1$ are the only closed 3-manifolds with fundamental group $\Bbb Z$.
Best Answer
Real projective space $\mathbb{RP}^n$ has fundamental group $\mathbb Z/2\mathbb Z$ for $n\geq 2$. This the quotient of the sphere $S^n$ by the antipodal action $x\sim -x$. In fact $S^n$ is a $2$-sheeted universal cover, which implies by covering space theory that its fundamental group is of order $2$.