A finitely-generated module over a principal ideal domain is always isomorphic to $R^n\oplus R/a_1\oplus\cdots\oplus R/a_n$ where $n$ is a nonnegative integer and $a_i\in R$ for $i=1,\dots,n$. This is called the structure theorem for modules over a principal ideal domain. Examples of principal ideal domains include fields, $\Z$, $\Z[\sqrt{2}]$, and the polynomial ring $k[x]$ when $k$ is a field.

If $a\in R$ is not a unit, then $R/a$ is not projective, since $a$ annihilates any element of $R/a$ and therefore $R/a$ cannot be the direct summand of any free module. Therefore, we can conclude from the structure theorem that *any finitely-generated projective module over a principal ideal domain is a free module*. Don’t get your hopes up though: there are many examples of non-free projective modules.

But let’s stick with principal ideal domains. It is actually true that every projective module over a principal ideal domain is free. Kaplansky in [1] proved the following even stronger theorem:

**Theorem.**If $R$ is an integral domain in which every finitely generated ideal is principal, then every projective $R$-module is free.