Why $(x)$ is a prime non-maximal ideal in $K[x,y]$ where $K$ is a field? The ring of poynomials $K[x,y]$, $K$ a field is not a principal ideal domain. I want to show that in this ring non-zero prime ideals need not be maximal.

I am having difficulties in showing that $(x)$ is prime but it is not maximal.

Let $f(x)$, $g(x)$ be two elements of $K[x,y]$ such that $f(x)g(x)$ is in $(x)$. Then there exists $h(x)$ in $K[x,y]$ such that $f(x)g(x)=xh(x)$. So, $x$ divides the product $f(x)g(x)$. 

How can I arrive in the conclusion that either $f(x)$ or $g(x)$ is in $(x)$?

Would you help me, please?
The ring homomorphism $K[x,y] \to K[y], f(x,y) \mapsto f(0,y)$ induces an isomorphism $K[x,y]/(x) \cong K[y]$. Now $K[y]$ is a domain, but not a field, thus $(x)$ is prime, but not maximal.
The answer of MatheiBoulomenos exploits the equivalence "$P$ prime $\iff$ $A/P$ domain" and is certainly correct.

But you can prove that $(x)$ is prime directly from the definition as follows.

Let $P(x,y)$ and $Q(x,y)$ be two polynomials with 
$$
P(x,y)Q(x,y)\in(x).\qquad\qquad(*)
$$

Write $P(x,y)=p(y)+xP_1(x,y)$ and $Q(x,y)=q(y)+xQ_1(x,y)$ separating the monomials that do not contain $x$.
Then
$$
P(x,y)Q(x,y)=p(y)q(y)+x[P_1(x,y)q(y)+Q_1(x,y)p(y)+xP_1(x,y)Q_1(x,y)]
$$
and the hypothesis $(*)$ implies that  $p(y)q(y)=0$. But since $K[y]$ is a domain this implies that, for instance, $p(y)=0$ which means that $P(x,y)\in(x)$.