Number Fields
An (algebraic) number field is a subfield of $\mathbb{C}$ whose degree over $\mathbb{Q}$ is finite.
It turns out that number fields are Dedekind domains thus all their ideals factor uniquely into prime ideals. An example of a ring where this is not true is $\mathbb{Z}[\sqrt{3}]$: take the ideal $I = \langle 2, 1+\sqrt{3} \rangle$. Then $I \ne \langle 2\rangle$, but $I^2 = 2I$. Furthermore, $I$ is the unique prime ideal containing $\langle 2\rangle$ and hence $\langle 2\rangle$ is not the product of prime ideals.
Example: Let $\omega = e^{2 \pi i / m}$ for an integer $m$. Then $\mathbb{Q}[\omega]$ is the $m$th cyclotomic field. The $m$th and $2m$th cyclotomic fields are identical because we have $\omega = \omega^{m+1} = (\omega^2)^{(m+1)/2} \in \mathbb{Q}[\omega^2]$.
Example: The quadratic fields are the number fields $\mathbb{Q}[\sqrt{m}]$ for squarefree $m$ (and these are exactly the number fields with degree 2 over $\mathbb{Q}$). The real quadratic fields are the $\mathbb{Q}[\sqrt{m}]$ with $m \gt 0$, and the imaginary quadratic fields are those with $m \lt 0$. Notice the $m = 1, 3$ cases are also cyclotomic fields. By considering the equation $\sqrt{m}=a+b\sqrt{n}$ it can be seen that the fields $\mathbb{Q}[\sqrt{m}]$ are pairwise nonisomorphic.
An algebraic integer is a complex number that is a root of a monic polynomial in $\mathbb{Z}[x]$.
Theorem: The minimal polynomial of an algebraic integer over $\mathbb{Q}$ has coefficients in $\mathbb{Z}$.
Proof: This follows from the following lemma.
Lemma: Let $f\in\mathbb{Z}[x]$ be monic. Then if $f = g h$ for monic $g,h \in\mathbb{Q}[x]$ then $g, h \in \mathbb{Z}[x]$.
Proof: (This is a special case of Gauss' Lemma.) Let $m,n$ be the smallest positive integers such that $m g, n h \in \mathbb{Z}[x]$, so the coefficients of $m g, n h$ have no common factor. (For example, if $m g$ did have a common factor $d$, we could replace $m$ by $m/d$; we know $d  m$ because the leading coefficient of $m g$ is $m$ since $g$ is monic.) Now if $m n \gt 1$, then let $p$ be some prime dividing $m n$. Consider the equation $m n f = (m g)(n h) = 0 (mod p)$. Since $\mathbb{Z}_p[x]$ is an integral domain, this means $(m g) = 0$ or $(n h)=0$, implying that $p$ divides all the coefficients of $m g$ or $n h$, which is a contradiction. Thus $m = n = 1$.
Corollary: The only algebraic integers in $\mathbb{Q}$ are the ordinary integers.
Corollary: Let $m$ be a squarefree integer. The set of algebraic integers in quadratic field $\mathbb{Q}[\sqrt{m}]$ is
Proof: Let $\alpha = r + s\sqrt{m}$ for rationals $r,s$. If $s \ne 0$ then the minimal polynomial of $\alpha$ over $\mathbb{Q}$ is
Thus $\alpha$ is integral if and only if $2r$ and $r^2  m s^2$ are integers, implying the results above.
Theorem: Let $a \in \mathbb{C}$. The following are equivalent.

$a$ is an algebraic integer.

$\mathbb{Z}[a]$ is finitely generated as an additive group.

$a$ belongs to a subring of $\mathbb{C}$ that has a finitely generated additive group.

$a A \subset A$ for some finitely generated additive subgroup $A \subset \mathbb{C}$.
Proof: (1) $\implies$ (2): If $n$ is the degree of $a$ over $\mathbb{Q}$ then $\mathbb{Z}[a]$ is generated by $1, a, ..., a^{n1}$.
(2) $\implies$ (3) $\implies$ (4) is clear.
(4) $\implies$ (1): Let $a_1,...,a_n$ generate $A$. We may write
where $M$ is some $n \times n$ matrix with integer entries. Thus
But since the vector $(a_1 ... a_n)$ is nonzero, we must have that $det(a I  M) = 0$. This is a monic equation in $a$ (of degree $n$), so $a$ must be an algebraic integer.
Corollary: If $a,b$ are integral, so are $a+b, a b$
Proof: Since $\mathbb{Z}[a], \mathbb{Z}[b]$ are finitely generated, we have that $\mathbb{Z}[a,b]$ is finitely generated.
Thus the set of algebraic integers in $\mathbb{C}$ form a ring, which we shall denote by $\mathbb{A}$. We call a the subring of algebraic integers of $K$ the number ring corresponding to $K$.
In other texts the ring of algebraic integers is denoted $\mathbb{Z}_ \bar{\mathbb{Q}}$, and the number ring corresponding to a field $K$ is denoted $\mathbb{Z}_K$.