Let's rephrase it slightly to gain a little more insight. Let $\,\ell(f) = f(\sqrt{5})\,$ be the map that evaluates $\,f(x)\,$ at $\,x = \sqrt{5}.\,$ Note that it is a ring hom: $\ \ell(f\pm g) \,=\, \ell f \pm \ell g ,\, $ and $\ \ell(fg) = (\ell f)\,(\ell g).\ $
More generally let $\,\ell \,$ be any ring hom and let $I$ be its kernel, i.e. all $f$ such that $\,\ell f = 0.\,$
Then $\,f,g \in I\,\Rightarrow\, \ell f,\,\ell g=0\,\Rightarrow\ \ell(f\pm g) = \ell f \pm\ell g = 0\pm0 = 0\ \Rightarrow\, f\pm g\in I,\ $ and
further $\ \ell(fh) = \ell f\, (\ell h) = 0\cdot \ell h = 0,\ $ so $\,fh\in I.\,$ Thus the kernel of a ring hom is an ideal.
Likewise, many ideals arise naturally as kernels of ring homomorphisms.
Remark $\ $ This raises an important question: why is the evaluation map a ring hom? Have you proved that yet? Note that this is not true for any ring, since, if so, evaluating $\, ax = xa $ at $\,x = b\,$ shows $\,ab = ba\,$ so the coefficient ring is commutative. In fact, this necessary condition is also sufficient for evaluation to be a ring hom. You should prove this at some point, since it helps to understand essential properties of polynomial rings $\,R[x]\,$ (as universal $R$-algebras).