Most of the answer is showing that in the quotient ring of the ring of ring of polynomials modulo the ideal generated by $f(x),$ there are multiplicative inverses. One can show that be seeing how to actually find the multiplicative inverse of any non-zero element (and "non-zero" means in effect corresponding to any polynomial that is not a multiple of $f(x),$ i.e. is not $f(x)$ multiplied by some other polynomial.
The division algorithm applied to polynomials is this: Divide a polynomial $g(x)$ by a polynomial $h(x)$ and get a quotient and a remainder, and the degree of the remainder is less than the degree of the $h(x).$
The division algorithm is used in Euclid's algorithm. The way of finding multiplicative inverses by using Euclid's algorithm makes use of the quotients found when applying Euclid's algorithm. In this answer I explained how to do that with integers as opposed to polynomials. It's done the same way with polynomials. In order for this to work in every case, it it necessary that the polynomial $f(x)$ be irreducible.