Now is a very good time for a quick foray into the ideal-theoretic version of Sun-Ze (better known as the Chinese Remainder Theorem). Let $R$ be a commutative ring with $1$ and $I,J\triangleleft R$ coprime ideals, i.e. ideals such that $I+J=R$. Then
$$\frac{R}{I\cap J}\cong\frac{R}{I}\times\frac{R}{J}.$$
First let's recover the usual understanding of SZ from this statement, then we'll prove it. Thanks to Bezout's identity, $(n)+(m)={\bf Z}$ iff $\gcd(n,m)=1$, so the hypothesis is clearly analogous. Plus we have $(n)\cap(m)=({\rm lcm}(m,n))$. As $nm=\gcd(n,m){\rm lcm}(n,m)$, if $n,m$ are coprime then compute the intersection $(n)\cap(m)=(nm)$. Thus we have ${\bf Z}/(nm)\cong{\bf Z}/(n)\times{\bf Z}/(m)$. Clearly induction and the fundamental theorem of arithmetic (unique factorization) give the general algebraic version of SZ, the decomposition ${\bf Z}/\prod p_i^{e_i}{\bf Z}\cong\prod{\bf Z}/p_i^{e_i}{\bf Z}$.
(How this algebraic version of SZ relates to the elementary-number-theoretic version involving existence and uniqueness of solutions to systems of congruences I will not cover.)
Without coprimality, there are counterexamples though. For instance, if $p\in\bf Z$ is prime, then the finite rings ${\bf Z}/p^2{\bf Z}$ and ${\bf F}_p\times{\bf F}_p$ (where ${\bf F}_p:={\bf Z}/p{\bf Z}$) are not isomorphic, in particular not even as additive groups (the product is not a cyclic group under addition).
Now here's the proof. Define the map $R\to R/I\times R/J$ by $r\mapsto (r+I,r+J)$. The kernel of this map is clearly $I\cap J$. It suffices to prove this map is surjective in order to establish the claim. We know that $1=i+j$ for some $i\in I$, $j\in J$ since $I+J=R$, and so we further know that $1=i$ mod $J$ and $1=j$ mod $I$, so $i\mapsto(I,1+J)$ and $j\mapsto(1+I,J)$, but these latter two elements generate all of $R/I\times R/J$ as an $R$-module so the image must be the whole codomain.
Now let's work with ${\cal O}={\bf Z}[i]$, the ring of integers of ${\bf Q}(i)$, aka the Gaussian integers. Here you have found that $(2)=(1+i)(1-i)=(1+i)^2$ (since $1-i=-i(1+i)$ and $-i$ is a unit), that the ideal $(3)$ is prime, and that $(5)=(1+2i)(1-2i)$. Furthermore $(1+i)$ is obviously not coprime to itself, while $(1+2i),(1-2i)$ are coprime since $1=i(1+2i)+(1+i)(1-2i)$ is contained in $(1+2i)+(1-2i)$. Alternatively, $(1+2i)$ is prime and so is $(1-2i)$ but they are not equal so they are coprime. Anyway, you have
- ${\bf Z}[i]/(3)$ is a field and
- ${\bf Z}[i]/(5)\cong{\bf Z}[i]/(1+2i)\times{\bf Z}[i]/(1-2i)$ is a product of fields.
Go ahead and count the number of elements to see which fields they are. However, ${\bf Z}[i]/(2)={\bf Z}[i]/(1+i)^2$ is not a field or product of fields, although the fact that its characteristic is prime (two) may throw one off the chase. In ${\bf Z}[i]/(1+i)^2$, the element $1+i$ is nilpotent. Since this ring has order four, it is not difficult to check that it is isomorphic to ${\bf F}_2[\varepsilon]/(\varepsilon^2)$, which is not a product of fields since $\epsilon\leftrightarrow 1+i$ is nilpotent and products of fields contain no nonzero nilpotents.
Say that $a \equiv_n b$ if $a - b = kn$ for some nonzero integer $k$. Then $\equiv_n$ is the usual equivalence relation modulo $n$ for $n\in\mathbb{Z}$. On the other hand, $\equiv_0$ can be made sense of, whereas "division by zero" doesn't really make sense.
Specifically, $a \equiv_0 b$ if $a-b = k0$ for some nonzero integer $k$. But this means that $a-b = 0$, which implies that $a=b$. Hence $\overline{a} = \{a\}$ for each $a\in\mathbb{Z}$. This implies that $\mathbb{Z}_0 = \{\overline{a} : a\in\mathbb{Z}\} \cong \mathbb{Z}$, where the isomorphism is the obvious choice.
Best Answer
Yes, if $n$ is a rational integer, then $\mathbb{Z}[i]/n\mathbb{Z}[i]$ is a field if and only if it is an integral domain, if and only if $n$ is a prime number which is $\equiv 3 \pmod{4}$. You can argue this using some elementary number theory and some results about unique factorization domains (as well as the fact that $\mathbb{Z}[i]$ is a unique factorization domain). I'll show that if $n$ is not a prime number which is $3 \pmod{4}$, then that ring is not an integral domain.
Writing $n$ as a product of prime numbers and using the Chinese remainder theorem, we can reduce to the case where $n$ is a prime power, say $n = p^m$ for some $m \geq 1$.
Obviously, $\mathbb{Z}[i]/ p^m\mathbb{Z}[i]$ is not an integral domain when $m \geq 2$, since the image of $p$ there is nonzero and nilpotent. So $m$ must be $1$.
If $p = 2$, then $\mathbb{Z}[i]/2\mathbb{Z}[i]$ is not an integral domain, because the images of $1+i$ and $1-i$ are nonzero, yet their product is.
If $p \equiv 1 \pmod{4}$, then by a result from elementary number theory, $p$ can be written as a sum of two squares: $p =a^2 + b^2$. Actually, you can argue this directly from the fact that $\mathbb{Z}[i]$ is a UFD. Then $p = (a+bi)(a-bi)$, and again the images of $a+bi$ and $a-bi$ in the quotient ring are nonzero, but their product is.