I find the following proposition in my class notes (ring theory) without proof, not sure if I have wrote it down correctly .
Let $P$ be a maximal ideal in the ring of integers $Z[\sqrt{d}]$, then $Z[\sqrt{d}]/P$ is a finite field, and there is a unique prime $p\in P$ such that $pZ=P\cap Z\ne\emptyset$, moreover $|Z[\sqrt{d}]/P|\le p^2$ and has size power of $p$. Inparticular, $|Z[\sqrt{d}]/P|=p^2$ if and only if $P=pZ[\sqrt{d}]$, $|Z[\sqrt{d}]/P|=p$ if and only if $Z[\sqrt{d}]/P\simeq Z/pZ$.
I know how to prove $Z[\sqrt{d}]/P$ is a finite field, but have no idea how the remaining parts works. I would appreciate any help/enlightenment.
Hint:
$\mathbf Z[\sqrt d]/\mathfrak p$ is a $\mathbf Z/p\mathbf Z$-vector space of dimension $\le 2$.