If you have the right concept of quotient rings and polynomial rings, this fact becomes obvious (literally, not in the usual "it is easy to see that"-sense).
A polynomial ring $R[X]$ is a ring which contains $R$ and an additional element $X$ with no further restrictions on how we calculate with it. Meaning that the only equations satisfied by $X$ are those which must be satisfied by virtue of the ring axioms. For instance, if $R=\mathbb R$, then $X+3X=4X$ by the distributive property. But $X^2\neq X^3$, because none of the ring axioms force those two things to be equal.
A quotient ring $R/I$ is a ring with the same rules as in $R$, but with the additional rule that if the result of any calculation in $R$ is an element of $I$, we let the result be $0$ instead. For instance, in $\mathbb Z$ we have that $3+1=4$, which is an element of $\langle 4\rangle$, so in $\mathbb Z/\langle 4\rangle$ we have $3+1=0$.
Now if $f$ is a polynomial in $R[X]$, then quotient ring $R[X]/\langle f\rangle$ is a ring which we obtain by adding an element $X$, and then enforcing the rule that any expression using this $X$ is $0$ if it's in $\langle f\rangle$. Now, $f(X)$ is obviously in $\langle f\rangle$. That's part of the definition of $\langle f\rangle$. So $f(X)$ is $0$ in $R[X]/\langle f\rangle$. And thus $X$ is a root of $f$.
The takeaway is that if you see a ring like $\mathbb Z[X]/\langle X^2+1\rangle$, you should really think of it as a ring which contains $\mathbb Z$ and an additional element $X$ satisfying $X^2+1=0$. (Meaning that this ring is essentially $\mathbb Z[\mathrm i]$, by the way).
You still need to prove this rigorously, the method of which depends on how you defined polynomial rings and quotients. But this piece of intuition may help you on the way.