$K[x_1,x_2, ..., x_n]$ is not a PID if $\,n> 1$ Every ideal in $K[x]$ is of the form $(p(x))$ for some $p(x) \in K[x]$. But the result is not valid for the ring $K[x_1,...x_n]$.
Comments: 
I was able to solve the first case using the division algorithm.
But I have difficulty justifying the second part, I know that the ideal $ (x_1, x_2) $ is an ideal that is not generated by $p(x)$. 
 A: Hint $ $ If it is a PID then  $(x_1,\cdots,x_n) = (a)$ so $\,a\,$ is a common divisor of nonassociate primes $x_i\,$ so $a$ is a unit, so evaluating at all $\,x_i = 0\,$ implies $\,0\,$ is a unit in the field $K,$ contradiction.
Remark $ $ More conceptually, it is easy to show that PIDs have dimension $\le 1,\,$ i.e. nonzero prime ideals are maximal, but here we have $\,(0)\subsetneq (x_1) \subsetneq (x_1, x_2)\subsetneq (1)$ hence the nonzero prime $(x_1)$ is not maximal, so the ring is not a PID. In fact PIDs are precisely the UFDs of dimension $\le1.$
A: More generally:

If $R[X]$ is a PID, then $R$ is a field.

Indeed:
Take $a\in R$ with $a\ne0$. Consider the ideal $I=(a,X)$. Then $I=(f)$ for some $f$. Now, $a=fg$ implies that $f$ is a constant. Finally, $X=fh$ implies that $f$ is a unit. Thus, $I=R[X]$. Write $1=ap+Xq$ and evaluate at $X=0$. You get $1=ap(0)$, which implies that $a$ is a unit.
Apply this result to $R=K[x_2,\dots, x_n]$, which is not a field, to conclude that $K[x_1,x_2,\dots, x_n]=K[x_2,\dots, x_n][x_1]$ is not a PID.
A: Let $x,y \in K[x,y]$ such that $gdc(x,y)=1$, i.e. there are $p(x,y),q(x,y) \in K[x,y]$ with $1=xp(x,y)+yq(x,y)$, left of this relation there is a polynomial with term known $1$, and right there is a polynomial with term known $0$, but
$$(x,y)= \left \{ xp(x,y)+yq(x,y) : p,q \in K[x,y] \right \}=\left \{ f(x,y) : f(0,0)=0 \right \}$$
and $(x,y)$ can not be principal.
