It does! And you can even make the stronger statement that the resulting polynomial is degree at most $n$ (just like with quadratics).
If you've seen systems of linear equations, there's an easy way to see why this is the case. Suppose you want a polynomial $f(x) = a_0 + a_1 x + \ldots + a_n x^n$ such that $f(x_0) = y_0$, $f(x_1) = y_1$, \ldots, $f(x_n) = y_n$ where we assume $x_i \neq x_j$ if $i \neq j$. The equations $f(x_i) = y_i$ are really $n+1$ equations in $n+1$ unknown variables $a_0,\ldots,a_n$ (i.e., in the coefficients of the unknown polynomial $f(x)$):
\begin{align}
a_0 + x_0 a_1 + \ldots + x_0^n a_n &= y_0 \\
&\vdots\\
a_0 + x_n a_1 + \ldots + x_n^n a_n &= y_n
\end{align}
or in matrix form
$$
\begin{pmatrix}
1 & x_0 & \cdots & x_0^n\\
1 & x_1 & \cdots & x_1^n\\
\vdots&&&\vdots\\
1 & x_n & \cdots & x_n^n
\end{pmatrix}
\begin{pmatrix}
a_0\\a_1\\\vdots\\a_n
\end{pmatrix}
= \begin{pmatrix}
y_0\\y_1\\\vdots\\y_n\end{pmatrix}.
$$
The $(n+1)\times(n+1)$ matrix on the left is called the Vandermonde matrix of $x_0,\ldots,x_n$, and (with some work) you can show that its determinant is always equal to
$$
\prod_{0 \leq i < j \leq n}(x_j - x_i),
$$
which is nonzero if $x_j \neq x_i$ for $j \neq i$ like we assumed for obvious reasons above. It follows that the matrix is invertible, and so there is a solution to this system of equations:
$$
\begin{pmatrix}
a_0\\a_1\\\vdots\\a_n
\end{pmatrix}
= \begin{pmatrix}
1 & x_0 & \cdots & x_0^n\\
1 & x_1 & \cdots & x_1^n\\
\vdots&&&\vdots\\
1 & x_n & \cdots & x_n^n
\end{pmatrix}^{-1}\begin{pmatrix}
y_0\\y_1\\\vdots\\y_n\end{pmatrix}.
$$
What's more, notice that we've actually proven something stronger than what we set out to. Not only is there such a polynomial of degree $n$ or less, the polynomial is unique! That is,
For any set of $n+1$ points $(x_i,y_i)$ with $x_i \neq x_j$ for $i \neq j$, there is a unique polynomial $f$ of degree at most $n$ such that $f(x_i) = y_i$ for all $i$.
If you're interested, the Wikipedia page on polynomial interpolation algorithms provides some greater technical detail about the what these coefficients look like when written out explicitly and also how efficiently some related algorithms can be implemented. This includes so-called Lagrange interpolation method, which is derived from the above solution.
Assume you have given $n+1$ points $(x_1,y_1),\cdots, (x_{n+1},y_{n+1}).$ (Of course, $x_i\ne x_j$ if $i\ne j.$) A polynomial of degree $n$ is of the form $p_n(x)=a_nx^n+\cdots+a_1x+a_0.$ To study the existence and uniqueness of such a polynomial consider the system of linear equations:
$$
\left\{\begin{array}{ccc}
a_nx_1^n+a_{n-1}x_1^{n-1}\cdots+a_1x_1+a_0 & =& y_1\\ \vdots & &\\
a_nx_{n+1}^n+a_{n-1}x_{n+1}^{n-1}\cdots+a_1x_{n+1}+a_0 & =& y_{n+1}
\end{array}\right.
$$
We write the system as
$$
\begin{pmatrix}x_1^n & x_1^{n-1} &\cdots & x_1 & 1 \\ \vdots & \vdots & \ddots & \vdots \\ x_{n+1}^n & x_{n+1}^{n-1}& \cdots & x_{n+1} & 1\end{pmatrix} \begin{pmatrix} a_n \\ \vdots \\ a_0 \end{pmatrix}=\begin{pmatrix} y_1 \\ \vdots \\ y_{n+1} \end{pmatrix}
$$
Since the matrix of coefficients of the system is non singular (it is a Vandermonde matrix (see Vandermonde)) the system has a unique solution, that is, there exists one polynomial of degree $n$ through the $n+1$ given points, and it is unique.
Best Answer
If $p$ and $q$ are polynomials agreeing on infinitely many points, then $p-q$ is a polynomial that’s 0 on infinitely many points.
But if a polynomial $f$ of degree $n$ is $0$ on more than $n$ points, then it’s zero everywhere. (If it has zeroes $a_1, \ldots a_n$, then by repeated division it’s of the form $c(x-a_1)\cdots(x-a_n)$; if it’s zero at some other point as well, then we get $c=0$.)
So a polynomial that’s 0 on infinitely many points is 0 everywhere. So, going back to the beginning, if $p$ and $q$ are polynomials agreeing on infinitely many points, then $p-q$ is zero everywhere, i.e. $p=q$.