If $q \in \mathbb N$ and $q = p_1^{n_1} ... p_j^{n_i}$ where all of the $p_i$ are prime numbers then the prime ideals of $\mathbb Z / q\mathbb Z$ are all the $(p_i)$. What happens when we localize $\mathbb Z / q \mathbb Z$ at $(p_i)$? I think we should get the ring $\mathbb Z / p_i^{n_i} \mathbb Z$ but don't really know how to prove it.
Thanks for the help!
Let $A=\mathbb{Z}/q\mathbb{Z}$ and let $x=q/p_i^{n_i}$ considered as an element of $A$. Note that $x\not\in (p_i)$ and thus is inverted in the localization $A_{(p_i)}$, and $xp_i^{n_i}=0$ in $A$. Thus, the localization map $A\to A_{(p_i)}$ factors through the quotient $A\to A/(p_i^{n_i})$. Moreover, every element of $A\setminus(p_i)$ maps to a unit in $A/(p_i^{n_i})\cong\mathbb{Z}/p_i^{n_i}\mathbb{Z}$, and so the factoring map $A/(p_i^{n_i})\to A_{(p_i)}$ is actually an isomorphism.