Given $n+1$ points, you can uniquely fit a degree $n$ polynomial (e.g. with the help of Lagrange polynomials).
For a degree one polynomial, a line, you need two points (makes sense, right?). The formula looks like $L(x) = \dfrac{x-x_0}{x_1-x_0}f(x_1) + \dfrac{x-x_1}{x_0-x_1}f(x_0),$
Where the points are $(x_0,f(x_0)), (x_1,f(x_1))$
Notice here what happens to the left summand when we plug in $x_0$: we get zero contribution from this term; whereas, when we plug in $x_1$, we recover the function $f(x_1)$ that we're trying to reach. Notice also that when we plugged in $x_0$ and $x_1$, the RHS went to $f(x_0)$ and $0$ respectively as well. Thus $L(x_1) = f(x_1)$ and $L(x_0) = f(x_0)$. We "constructed" a polynomial given two pairs of points that hits them with least degree needed.
For three points (quadratic), you want the similar cancellation effect:
$L(x) = \dfrac{x-x_0}{x_1-x_0}\dfrac{x-x_2}{x_1-x_2}f(x_1) +\dfrac{x-x_1}{x_0-x_1}\dfrac{x-x_2}{x_0-x_2}f(x_0) + \dfrac{x-x_1}{x_2-x_1}\dfrac{x-x_0}{x_2-x_0}f(x_2)$
See how the magic happens there? You should be able to construct the fourth degree polynomial from here. Hope this helps.