$p$ is a prime in $\mathbb{Z}$ , then $(p)$ is a prime ideal, What can be said about the relationship of $\mathbb{Z}_p$ and the localization $\mathbb{Z}_{(p)}$? ( This question is from 'Hungerford' Algebra book )
My trial :
Any integer $n$ that is not divisible by $p$ has a unique inverse in $\mathbb{Z}_p$ ( what does this mean? ) .
Then ( and why is this a consequence? ) by the universal property of the localization, there is a ring homomorphism $\mathbb{Z}_{(p)}\rightarrow \mathbb{Z}_p$.
Recall that the localization $\mathbb{Z}_{(p)}$ is just the fractions ring $\{\frac{a}{b}:\ a, b\in \mathbb{Z}\ and\ b\neq 0 \ and \ p\nmid b\}$
Does this answer the question ? But what homomorphism is that ? Do we need to explicitly describe it ?
If by $\mathbb{Z}_p$ you mean $\mathbb{Z}/p\mathbb{Z}$:
That any $n$ not divisible by $p$ has a unique inverse in $\mathbb{Z}/p\mathbb{Z}$ means that since $n$ is coprime to $p$ by Bezout's identity there exist integers $r,s$ such that $$1=nr+ps.$$ Therefore $1\equiv nr\pmod{p}$, so $r$ is an inverse of $n$ in $\mathbb{Z}/p\mathbb{Z}$ (check that $r$ is in a unique coset of $p\mathbb{Z}$). Denote $n^{-1}:=r$, then the homomorphism from $\mathbb{Z}_{(p)}$ to $\mathbb{Z}/p\mathbb{Z}$ is given by $$\begin{align} \mathbb{Z}_{(p)}&\rightarrow \mathbb{Z}/p\mathbb{Z}\\\\ \frac{a}{b}&\mapsto ab^{-1} \end{align} $$ where $b^{-1}$ is well-defined because $p$ does not divide $b$.
If by $\mathbb{Z}_p$ you mean $\mathbb{Z}_p$ (the ring of $p$-adic integers):
You can identify elements in $\mathbb{Z}_p$ as formal power series in $p$ with coefficients in $\{0,\dots,p-1\}$, so if $p$ does not divide an element $x\in\mathbb{Z}_p$ then $$x=a_0+a_1p+a_2p^2+\dots$$ with $a_0\neq 0$ and one can find an inverse for $x$ as a formal power series in $p$. Gathering terms of the formal inverse $x^{-1}=\sum_{n=0}^{\infty}b_np^n$ you can ensure that $b_n\in\{0,\dots,p-1\}$. So again we have an analogous homomorphism from $\mathbb{Z}_{(p)}$ to $\mathbb{Z}_p$. Embedding $\mathbb{Z}_p$ and $\mathbb{Q}$ in $\mathbb{Q}_p$ you can actually check that $\mathbb{Z}_p\cap\mathbb{Q}=\mathbb{Z}_{(p)}$.