Hopefully this is a foolish question with a simple answer.
I've seen it said that, for polynomial $f(x)$
$$ f(a)=0 \iff (x-a) \mid f(x) $$
I can see the implication from factor to zero: $(x-a) \mid f(x) \implies f(a)=0$, because anything multiplied by zero is zero, and if $x=a$, then $(x-a) = 0$.
But I'm not sure of the converse: $f(a) = 0 \implies (x-a) \mid f(x)$.
If $f(a)=0$, is the only way it can be zero is if it includes a factor $(x-a)$? How can we be sure there isn't some other circumstance that could make it zero? I guess I'm looking for a proof.
Hopefully it is a foolish question and simple answer!
You can divide $f(x)$ by $(x-a)$ to get $$f(x) = q(x)(x-a) + r(x)$$ where $\deg(r) < \deg(x-a)=1$. Therefore $\deg(r)= 0$ so $r$ is a constant and we can drop the $x$. Now evaluate at $a$: $$f(a) = q(a)(a-a) + r$$
The LHS is zero by assumption, the RHS is equal to $r$. Thus $r=0$ and $(x-a)$ divides $f(x)$ without remainder.
$\,$
Edit: It seems to me like you're confused about why polynomial division always works, so here's the proof to clear things up.
Theorem. For any $f(x), g(x) \in \Bbb Q[x]$, $g(x) \neq 0$, there exist $q(x), r(x) \in \Bbb Q[x]$ such that $$f(x) = q(x)g(x) + r(x)$$ and where $\deg(r) < \deg(g)$.
Proof: First, choose any $q(x), r(x)$ such that the above equation is satisfied; i.e. $q(x) = 0, r(x) = f(x).$ If $\deg(r) < \deg(g)$, we are done.
Therefore assume $\deg(r) \geq \deg(g)$. Let $r(x) = r_nx^n + r_{n-1}x^{n-1} + \dots + r_0$, $g(x) = g_mx^m + g_{m-1}x^{m-1} + \dots + g_0$. Now let $r'(x) = r(x) - x^{n-m}r_ng_m^{-1}g(x)$, let $q'(x) = q(x) + x^{n-m}r_ng_m^{-1}$. Then $\deg r' < \deg r$ (just look at the coefficient of $x_n$) and again we have $$f(x) = q'(x)g(x) + r'(x).$$
If $\deg(r') < \deg(g)$ now, we can stop. If not, repeat the above with $q'$ and $r'$. Because $\deg(r) < \infty$, this procedure must stop after finitely many iterations, so eventually we will have a remainder of degree less than $\deg(g)$.
This concludes the proof.