Given a field $K$ and $p(x)\in K[x]$. Then the following conditions are equivalent:
a) $p(x)$ is irreducible over $K$.
b) $J = \langle p(x)\rangle$ is a maximal ideal in $K[x]$.
c) $K[x]/J$ is a field, where $J=\langle p(x)\rangle$.
My book proves $a\implies b$ as follows:
Since the degree of $p(x)$ is greater than or equal to $1$, we have that $J\neq K[x]$ (why the degree?).
If $I=\langle h(x)\rangle$ is an ideal of $K[x]$ such that $I$ contains $J$, let's prove that $J$ contains $I$. For that look at the following:
$$p(x)\in \langle p(x)\rangle \subseteq \langle h(x)\rangle \implies p(x) = g(x)h(x)$$ for some $g\in K[x]$. Since $p(x)$ is irreducible, we must have:
$$g(x) = a\in K - \{0\}$$ or $$h(x) = b\in K - \{0\}.$$
If $g(x)=a\neq 0$ we have $h(x) = a^{-1}\cdot p(x)\in J$ (because $h(x)$ is now $p(x)$ with some constant), and therefore $I$ is contained in $J$, so we have $I=J$, therefore $J$ is maximal ideal of $K[x]$.
Now, an unexpected proof of $a\implies c$ appears in the middle of this proof. If we consider the case $h(x)=b\neq 0$ we have (and this part I didn't understand) $I = \langle h(x)\rangle = K[x]$ and this proves $a\implies c$. I think I didn't understand this part because I'm having trouble visualizing $K[x]/J$ where $J = \langle p(x)\rangle$.
In another example, the book actually computes the quotient $A/I$ where $A = \mathbb{R}[x]$ and $I = \langle x^2+1\rangle$. It uses the theorem above to say that $L = A/I$ is a field since $x^2+1$ is irreducible over $K[x]$ (shouldn't it be $\mathbb{R}[x]$?). Then, it computes $L$ as follows: $$p(x) = q(x)(x^2+1)+r(x)$$
where $r(x) = bx+a$.
It then takes $p(x)\bmod I$ which gives the following:
$p(x) = q(x)(x^2+1)+r(x)=r(x)= bx + a$ (everything above is with that bar at the top but I don't know how to write it in LaTeX). Then, the book simply says that $L = \{bx + a: a,b \in \mathbb{R}\}$. Why is it that $L$ is the $p(x) \bmod I$? What am I missing about quotient rings? Can somebody clarify it for me?