Why $\mathbb{Z}$ (group of integer numbers) with $p$-adic topology is a countable precompact metric group with a linear topology?
Note : Call a topological group $G$ linear (and its topology a linear group topology) if $G$ has a base of $e$ formed by open subgroups of $G$.
Given $\varepsilon>0$ find $k$ with $\frac1{p^k}<\varepsilon$. Then The open $\varepsilon$-balls around $0, 1, \ldots, p^k-1$ cover $\mathbb Z$. Hence precompactness.
Let $U$ be an open neighbourhood of $0$. Then some $\varepsilon$-ball around $0$ is contained in $U$. As above, this ball contains $p^k\mathbb Z$ for $k$ big enough, which is a subgroup. Hence linearity.
(Countable metric group should of course be clear)