$p(x)$ irreducible polynomial $\iff J=\langle p(x)\rangle$ is a maximal ideal in $K[x]$ $\iff K[x]/J$ is a field 
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?
 A: There are several questions in your post.


*

*If the degree of $p(x)$ is greater than 1, then every nonzero element in $K[x]p(x)$ has degree bigger than 1 and therefore it cannot be the whole ring (doesn't contain polynomials of degree < $\deg(p(x))$).

*If $h(x)\equiv c\neq 0$ is a constant polynomial, then it is invertible, so that the ideal $I=\langle h\rangle$ is everything. This is ok, because by maximality of the ideal you want to show that every ideal that contains $J$ is either $J$ or everything. I'm not sure how this proves $a\Rightarrow c$. There is another step there which states that if $J$ is maximal, then in $K[x]/J$ there are no nontrivial ideals, which means that it is a field.

*$K[x]$ should be $\mathbb{R}[x]$, but maybe he just wanted to keep the notations from the theorem.

*Finally, the set of representatives to the cosets of $p(x)K[x]$ in $K[x]$ can be chosen to be all the polynomials of degree $<\deg(p(x))$. For example, in $\mathbb{C}$ we have elements of the form $a+bi$ where $i$ is just the image of $x$ from $\mathbb{R}[x]/x^2+1$, so these are exactly polynomials of degree <2. EDIT: In general, if our ideal is $\langle p(x)\rangle$ then every polynomial $h(x)$ can be divided by $p(x)$ (with residue) and we get the equation $h(x)=p(x)q(x)+r(x)$ where $r(x)\equiv 0$ or $\deg(r)<\deg(p)$. This means that either $h(x)$ is divisible by $p$ (so it belong to the coset $0+\langle p(x)\rangle$), or it has in its coset a polynomial $r(x)$ with a degree smaller than the degree of $p(x)$. Therefore, the set of all cosets is exactly $\{r(x)+\langle p(x)\rangle \mid  \deg(r)<\deg(p) \}$ (where we think of $\deg(0)=-\infty <\deg(p)$ for convenience).


One more thing, bar in LaTeX is just \bar{} or \overline{} which I think is better for longer expressions $\bar{x}, \overline{x+1}$.
A: There is a more general and perhaps cleaner approach. Let $A$ be a principal ideal domain, that is, a commutative domain all whose ideals are principal. Since $k[X]$ is Euclidean for $k$ a field, it is manifestly principal. It suffices we show that for $A$ a principal ideal domain, the following are equivalent:
$(1)$ The element $p\in A$ is irreducible.
$(2)$ The ideal $pA=(p)$ is maximal.
$(3)$ The quotient $A/pA$ is a field.
Suppose that $(1)$ holds, and that $(a)$ is an ideal containing $(p)$. This means, in particular, that $p=ab$ for some $b\in A$. Since $p$ is irreducible, this means that either $a$ or $b$ is a unit. In the first case $(a)=A$, and in the second case $(p)=(a)$, which proves $(p)$ is maximal.
Suppose now that $(2)$ holds. Then $A/pA$ is a commutative ring with only two ideals, since $pA$ is maximal, so it is a field. The converse is again easy to see from the correspondence of ideals between a ring and its quotient. It suffices then to prove that $(2)$ implies $(1)$. Now recall that principal ideal domains are unique factorization domains, and in such rings, irreducible and prime elements coincide. If $(p)$ is maximal, it is certainly prime, so it suffices to show by the remark above that $(p)$ a prime ideal implies $p$ is a prime element. Indeed, suppose that $p$ divides $ab$, so that $ab$ is in $(p)$, say $ab=pq$. Since $(p)$ is prime, either $a$ or $b$ lies in $(p)$. This means precisely that $p$ divides $a$ or $b$, so indeed $p$ is prime, and thus irreducible. 
