$\newcommand{\ZZ}{\mathbb{Z}}$
The elements of $\hat{\ZZ}$ have very explicit descriptions in terms of compatible sequences $(x_i)_{i\in\mathbb{N}}$ where each $x_i\in\ZZ/i\ZZ$.
There is a very natural map $\hat{\ZZ}\rightarrow\ZZ/n\ZZ$ given by "projection onto the $n$th coordinate". This is a homomorphism because the elements $(x_i)$ are compatible sequences. It is a good exercise to show that this is surjective, and that its kernel is $n\hat{\ZZ}$.
The open subgroups of a finitely generated profinite group are precisely the subgroups of finite index (this is a deep theorem of Nikolov and Segal). You also know that all open subgroups are closed.
The closed subgroups however need not be open and in general are far more numerous. Since $\hat{\ZZ}$ is abelian, every closed subgroup $H\le\hat{\ZZ}$ is normal and defines a quotient, which is finite iff $H$ is open. It's easy to see that the finite quotients of $\hat{\ZZ}$ are precisely the finite cyclic groups (you can prove this directly or use the universal property of profinite completions). However, there are many more non-open closed subgroups. For example, let $\pi$ be a set of prime numbers, and let $\hat{\ZZ}(\pi)$ be the set of compatible sequences $(x_i)$ where $i$ ranges over only natural numbers which are divisible only by the primes in $\pi$. Then projection onto such coordinates gives you a surjective map
$$\hat{\ZZ}\rightarrow\hat{\ZZ}(\pi)$$
whose kernel is a closed but not open subgroup of infinite index. The group $\hat{\ZZ}(\pi)$ is the pro-$\pi$ completion of $\ZZ$. The kernel of the map is the product $\prod_{p\notin\pi}\ZZ_p$ of the Sylow-$p$ subgroups for $p\notin\pi$ (note that $\hat{\ZZ} = \prod_p\ZZ_p$, where $\ZZ_p$ is the additive group of the $p$-adic integers).
I believe that all closed subgroups of $\hat{\ZZ}$ can be obtained as intersections and joins of the closed subgroups described above, though there are details to be worked out.