I urge you to look at the detailed 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 elegance and its efficiency. In essence, it's just repeated application of the Remainder Theorem, taken one step at a time.
Synthetic division is not presented very well in most high school math classes, which make it seem more mysterious (and simultaneously more mundane) than it actually is. It's based upon synthetic substitution, which is best to interpret as having the value for $x$ being substituted one degree at at time into the nested polynomial expression. At each step, the two leading terms are grouped and factored, so that the substitution reduces the degree by one.
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$. An important detail 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.