Let $p$ be a prime number. Let $x$ be a non-zero element in $\mathbb{Z}$. There exist integers $n$ and $a$ such that $x = p^na$, $(p, a)$ = 1. $n$ is uniquely determined by $x$. We denote $|x|_p = p^{-n}$. We define $|0|_p = 0$. For $x, y\in \mathbb{Z}$, we denote $d(x, y) = |x - y|_p$. $d$ is a metric on $\mathbb{Z}$. With this metric $d$, $\mathbb{Z}$ becomes a topological ring. We define $\mathbb{Z_p}$ as the completion of $\mathbb{Z}$ with respect to $d$. $\mathbb{Z_p}$ is a topological ring which contains $\mathbb{Z}$ as a dense subring.
$(p^n\mathbb{Z_p}), n = 1, 2, ...$ is a fundamental system of neighbourhoods of 0 in $\mathbb{Z_p}$. Each $\mathbb{Z_p}/p^n\mathbb{Z_p}$ is isomorphic to $\mathbb{Z}/p^n\mathbb{Z}$. Hence it suffices to prove that $\mathbb{Z_p} \cong \varprojlim\mathbb{Z_p}/p^n\mathbb{Z_p}$. Let $f_n: \mathbb{Z_p} \rightarrow \mathbb{Z_p}/p^n\mathbb{Z_p}$ be the canonical map for each n. When $n ≧ m$, $p^n\mathbb{Z_p} ⊂ p^m\mathbb{Z_p}$. Hence we can define a ring homomorphism $f_{mn}: \mathbb{Z_p}/p^n\mathbb{Z_p} \rightarrow \mathbb{Z_p}/p^m\mathbb{Z_p}$ by $f_{mn}(f_n(x)) = f_m(x)$. Let $A = \varprojlim\mathbb{Z_p}/p^n\mathbb{Z_p}$. Since $f_{mn}f_n = f_m$, we can define a map $f: \mathbb{Z_p} \rightarrow A$ by $f(x) = (f_n(x))$ for each $x \in \mathbb{Z_p}$. It's easy to see that $f$ is a continuous ring homomorphism. Since $∩p^n\mathbb{Z_p} = 0$, $f$ is injective.
Let $x = (x_n) \in A$. For each n, choose $a_n \in \mathbb{Z_p}$ such that $f_n(a_n) = x_n$. Since $a_n ≡ a_{n+1}$ (mod $p^n\mathbb{Z_p}$), $(a_n)$ is a Cauchy sequence in $\mathbb{Z_p}$. Hence there exists $a$ = lim $a_n$ in $\mathbb{Z_p}$. It's easy to see that $f(a) = x$. Hence $f$ is surjectve.
It remains to prove that $f$ is an open map. Let $π_n:A \rightarrow \mathbb{Z_p}/p^n\mathbb{Z_p}$ be the projection map. Since $f_n = π_nf$, $p^n\mathbb{Z_p} = (f_n)^{-1}(0) = f^{-1}((π_n)^{-1}(0))$. Hence $f(p^n\mathbb{Z_p}) = (π_n)^{-1}(0)$. Hence $f(p^n\mathbb{Z_p})$ is open. QED