I urge you to look at the answer I posted to a similar question here.
That question explains how to re-write the polynomial in nested form (Horner's form), which is a necessary first step to understanding how this algorithm works and also to appreciating its beauty and its efficiency.
The other key concept is the Remainder Theorem, which is true for polynomials of any degree, but is only being applied at each step in synthetic division to a linear factor of the form $(Ax+B)$. The theorem states that the remainder for $\frac{Ax+B}{x-a}$ is simply $Aa+B$. This can also be seen by considering a linear equation in point-slope form. Also very important to note is that the quotient for the prior expression is simply $A$, because the divisor $x-a$ is monic (has a coefficient of $1$ on its leading term).
Put more simply: $Ax+B = A(x-a) + (Aa+B)$
The algorithm starts with the two leading terms and then proceeds, incorporating one new term at at time, by using the remainder from the previous step as the "A" for the next step. Each remainder becomes, in turn, the leading coefficient for the next step, which then becomes the coefficient of the corresponding quotient term, after division. Remainders are found at each step by substituting $a$ for the next $x$ in the Horner's form polynomial, according to the Remainder Theorem.