Counterexample PID We know that if F is a field, then the polynomial ring over F is a PID.
Do you have a counterexample that shows that if F isn’t a field than the polynomial ring over F isn’t a PID?
 A: $\mathbf Z[X]$ is such a counter-example:  for any prime number $p$, the ideal $(p, X)$ is not principal for degree reasons in polynomials over an integral domain: $p$ should be a multiple of a generator, which therefore should be a constant, and this constant can be only $1$, $p$ or $-p$. You can easily check it can't be any of them.
Note that $(p,X)$ is a maximal ideal in $\mathbf Z[X]$  since
$$ \mathbf Z[X]/(p,X)\simeq (\mathbf Z/p\mathbf Z)[X]/(X)  \simeq \mathbf Z/p\mathbf Z$$
is a field.
A: You can even show, extending slightly the argument in the other answer, the following.

Suppose $A$ is a domain. Then $A[x]$ is a PID iff $A$ is a field.

If $A$ is a field, then $A[x]$ is Euclidean, and thus a PID.
Suppose now $A[x]$ is a PID. Let $0 \ne a \in A$. We want to show that $a$ is a unit in $A$.
Consider the ideal $(a, x)$ of $A[x]$. Note that $(a, x)$ is the ideal of $A[x]$ of polynomials whose costant term is a multiple of $a$. 
By assumption, $(a, x) = (c)$ for some $c \in A[x]$. 
$c \mid a$, thus $c$ has to be a constant. But the only constants that divide $x$ are the units of $A$. (If $c (b_{0} + b_{1} x + \dots) = x$, then $c b_{1} = 1$.)
Therefore $c$ is a unit, and then $(a, x) = (c) = A[x]$, so that $1 \in (a, x)$, that is, $1$ is a multiple of $a$, that is, $a$ is a unit in $A$.
