Let $p\in K[x]$ and let's say $deg(p)=n>0$. By assumption it has a root $\alpha_1\in K$. Then $x-\alpha_1|p$. So there is a polynomial $p_1\in K[x]$ of degree $n-1$ such that $p(x)=(x-\alpha_1)p_1(x)$. If $n-1>0$ then $p_1$ is not constant and then it has a root $\alpha_2\in K$. Hence $x-\alpha_2|p_1$ and then we can write $p_1(x)=(x-\alpha_2)p_2(x)$ where $p_2\in K[x]$ has degree $n-2$. Then $p(x)=(x-\alpha_1)(x-\alpha_2)p_2(x)$. Now if $p_2$ is not constant then take a root of $p_2$ in $K$ and continue by induction. At the end you will get the following equality:
Where $c,\alpha_1,\alpha_2,...,\alpha_n\in K$. The roots of $p$ are $\alpha_1,\alpha_2,...,\alpha_n$ and they are all in $K$.