It seems your question is: how does integer congruence arithmetic ("modular" arithmetic) extend to polynomials? Simply because the proofs of the basic congruence laws (sum and product rules) work universally (technically: they use only basic ring laws (distributive,commutative,associative), so the proofs remain valid in any commutative ring). This universality becomes clearer when one studies abstract algebra, which studies more structural versions of these ideas (ideals & quotient rings, a.k.a. residue rings).
In particular $\ f\equiv g\pmod m\ $ means that $\,m\mid f-g\,$ i.e. $\,(f-g)/m\in \Bbb Z[x],\,$ i.e. it is a polynomial with integer coefficients. Let's look at the proof of the product rule
$\bf{Congruence\ Product\ Rule}\rm\ \ \ \ \ \color{#c00}{F\equiv f},\ \ and \ \ \color{#0a0}{G\equiv g}\ \Rightarrow\ \color{blue}{FG\equiv fg}\ \ \ (mod\ m)$
$\bf{Proof}\rm\ \ \ m\mid \color{#c00}{F\!-\!f},\ \color{#0a0}{G\!-\!g}\ \Rightarrow\ m\mid (\color{#c00}{F\!-\!f})\ G + f\ (\color{#0a0}{G\!-\!g})\ =\ \color{blue}{FG - fg}\quad $ QED
This is the same as the proof for integers, except that we are working with polynomials. The proof works in both cases because it uses only basic (ring) arithmetic laws (distributive,commutative, associative), which hold true both for integers $\,\Bbb Z\,$ and polynomials $\,\Bbb Z[x],\,$ since both are commutative rings.
In particular, when computing mod $m$ the Product Rule yields $\,i\equiv j\,\Rightarrow\, i x^k\equiv j x^k.\,$ So we can replace all coefficients by their remainder mod $m$, i.e. we can mod out coefficients. Doing that in both of your examples quickly yields the sought congruences.
Remark $\ $ Informally (in rings) working "mod m" means adjoining the hypothesis $\,m = 0$ to the ambient (ring) axioms. Applying the ring axioms then yields inferences that other elements $= 0,\,$ e.g. if $\,m = 0 = m'\,$ that $\,am+b m' = 0\,$ for all $\,a,b\,$ in the ring. The algebraic structure underlying these matters will become clearer when one studies ideals of rings.
does it means 0x^3 + 0x^2+ 4x = 0 (mod 2) - where 4 and 6 are replace by 0 as it is mod 2?
– ronan Jan 24 '15 at 13:00