To expand Randall's comment into an answer:
The elements of a quotient ring $R/I$ (where $I$ is a two-sided ideal of the ring $R$) are the cosets of $I$, i.e. the sets of the form $a + I := \{a + i : i \in I\}$. In particular, the elements of $R/I$ are subsets of $R$!
When we talk about the residue of an element $x \in R$ in the quotient $R/I$, we mean the coset $x + I$.
So, the residue of $x$ in $\mathbb{Z}[x]/(f)$ is (by definition) the coset
$$x + (f) = \{x + i : i \in (f)\} = \{x + gf : g \in \mathbb{Z}[x]\}.$$
Be warned: sometimes it gets annoying to keep writing "$+~I$" everywhere, so people will sometimes just use "$x$" to refer to the residue of $x$ in some quotient. E.g. someone might say "$x^2 = 0$ in $R/I$" to mean "$x^2 + I = 0 + I$". It'll be up to you to keep track of the context and interpret elements as cosets when necessary! This can be confusing at first but gets easy once you've had enough experience :)