Let $K$ be an algebraic number field and $\mathcal{O}_K$ its ring of integers. I am trying to describe $Spec(\mathcal{O}_K[X])$ in terms of fibers of the map $g: Spec(\mathcal{O}_K[X]) \rightarrow Spec(\mathcal{O}_K)$. My main problem seems to be not knowing much about $Spec(\mathcal{O}_K)$. Here what I've got so far:
First, I know that the only prime ideals of $\mathcal{O}_K$ are the zero ideal and the maximal ideals, and I use the general fact that: $g^{-1}(p) \cong Spec(\mathcal{O}_K[X] \otimes Frac(\frac{\mathcal{O}_K}{p}))$, for a prime ideal $p$.
Now for the zero ideal of $\mathcal{O}_K$ we have: $g^{-1}((0)) \cong Spec(\mathcal{O}_K[X] \otimes Frac(\frac{\mathcal{O}_K}{(0)})) \cong Spec(\mathcal{O}_K[X] \otimes K) \cong Spec(K[X])$. $Spec(K[X])$ consists of the zero ideal and the primes generated by irreducible polynomials $f(x) \in K[X]$. The corresponding prime ideals in $Spec(\mathcal{O}_K[X])$ are $(0)$ and $(f(x))$ - after clearing denominators.
For any non-zero prime $m \subset \mathcal{O}_K$ we have: $g^{-1}(m) \cong Spec(\mathcal{O}_K[X] \otimes \frac{\mathcal{O}_K}{m}) \cong Spec(\frac{\mathcal{O}_K}{m}[X])$. Now I know that $\frac{\mathcal{O}_K}{m}$ is finite field so it is isomorphic to some $\mathbb{F}_p[X]/(g(x))$, but I don't know which primes in $Spec(\mathcal{O}_K[X])$ could correspond to primes of $Spec(\frac{\mathcal{O}_K}{m}[X])$.
I might be on the entirely wrong path here since I don't know much algebraic number theory so I don't know what I am dealing with. Any thoughts and suggestions will be much appreciated.
This is essentially Mumford's treasure map, or whatever it's called.
Let $X=\text{Spec}(\mathcal{O}_K[x])$, $Y=\text{Spec}(\mathcal{O}_K)$, and $X\to Y$ be the obvious map. We're trying to determine $X_y$, for each $y\in Y$.
Now, as you've observed, $X_{(0)}=\text{Spec}(K[x])$, whose prime ideals are those of the form $(f(x))$, for $f(x)\in K[x]$ irreducible. Now, what is the map $X_{(0)}\to X$? Well, it's take $(f(x))$, assuming without loss of generality that $f(x)\in\mathcal{O}_K[x]$, and send it to $(f(x))\in \mathcal{O}_K[x]$! So, the image of $X_{(0)}$ is precisely the set of irreducible polynomials $(f(x))\in\mathcal{O}_K[x]$.
Now, let's take a non-zero prime $\mathfrak{p}\in Y$. Then, as you've observed, $X_\mathfrak{p}$ is $\text{Spec}((\mathcal{O}_K/\mathfrak{p})[x])$, whose primes are those of the form $(g(x))$, for $g(x)\in(\mathcal{O}_K/\mathfrak{p})[x]$ irreducible. So, what's the map $X_\mathfrak{p}\to X$? Well, how did we get from $\mathcal{O}_K[x]$ to $(\mathcal{O}_K/\mathfrak{p})[x]$--by quotienting by $\mathfrak{p}\mathcal{O}_K[x]$! So, how do we go back, by taking $(g(x))$ to $(f(x),\mathfrak{p})$, where $f(x)$ is a lift of $g(x)$.