We have to understand the background idea at first. A non-zero polynomial $f(x) \in F[x]$ of degree $n$ has at most $~n~$ zeros in the field $F$. However your question says that a polynomial has $\text{infinitely}$ many zeros and hence we can think of some messy things lies inside.
Now suppose in your question the polynomial $f(x)$ is of degree $n$. Assume the $f(x) \neq0$. But it is given that $f(x)$ has infinitely many zeros. So there are $n+1$ elements $a_1,~a_2, \cdots, a_{n},~a_{n+1}$ such that \begin{align}f(x) &=(x-a_1)(x-a_2)\cdots (x-a_n)(x-a_{n+1}) g(x), \end{align} where $g(x) \in F[x]$. But this means that $\text{deg}(f) \geq n+1$, which is a contradiction [ $\because \text{deg}(f)=n$] unless $f(x) \equiv 0$. Hence $f(x) \equiv 0$.