Answer:
No principal ideal $(f(x))$ is maximal. If $f(x)$ is an integer $ n\ne ±1$, then $(n, x)$ is a bigger ideal that is not the whole ring. If $f(x)$ has positive degree, then take any prime number $p$ that does not divide the leading coefficient of $f(x)$. $(p, f(x))$ is a bigger ideal and it's not the whole ring, since $Z[x]/(p, f(x)) = (Z/pZ)[x]/(f(x))$ is not the zero ring.
I have a few questions about the answer. If someone can please clarify, that would be great.
Firstly, $(n,x)$ is the ideal generated by a linear combination of $n$ and $x$, is that correct? So that is the set of polynomials having $n$ as coefficients?
For the second part, can someone clarify why $(p,f(x))$ is a bigger ideal than $(f(x))$? Namely, this part: $Z[x]/(p, f(x)) = (Z/pZ)[x]/(f(x))$?
As for your first question: The ideal $\langle n \rangle$ consists of the polynomials in which all of the terms are multiples of $n$, the ideal $\langle n,x\rangle$ consists of the polynomials in which the constant coefficient is a multiple of $n$.
For the second part, in the ideal $\langle f(x)\rangle$ all of the polynomials have constant coefficients which are multiples of $p$, while the new one does not. This ideal is not the whole ring because all of the polynomials have positive degree or are integers that are multiples of $p$.
Notice that one case is still missing: The case in which $f(x)$ is a polynomial with positive degree and constant coefficient equal to $0$. in that case we can consider $\langle f(x),2\rangle$