Is the ring of integers of a local field an open subgroup? I apologize if my question is a bit naive, but I don't have much experience in number theory and sometimes get very confused.
Suppose $K$ is a non-archimedean local field (essentially a completion of a number field at some prime ideal of its ring of integers) and $\mathcal{O}_K$ is its ring of integers, i.e., its valuation ring ($\mathcal{O}_K = \{ x \in K \mid |x| \leq 1 \}$). 
It seems to follow immediately from the definition of $\mathcal{O}_K$ that it is a closed subgroup of the additive group of $K$. But then when one defines the adele ring, one takes the restricted product of completions of a number field $F$ with respect to open compact subgroups (definition of restricted product) of those completions, and these subgroups are the rings of integers. 
Also, in his proof that a local field $K$ is locally compact and its valuation ring $\mathcal{O}_K$ is compact, Neukirch states that for every $a \in K$, the set $a + \mathcal{O}_K$ is open.
So my question is: what is the topological status of $\mathcal{O}_K$ in $K$? Is it open, closed or both? Why? 
 A: In any metric space a nonempty closed ball is closed and a open ball is open. The latter is more or less by definition (since the open balls generate the topology of open sets). See if you can prove the first.
Since ${\cal O}_K$ is a closed ball of radius $1$ it is closed. It is also the union of all of the open balls of radius $1$ that it contains. Try to prove this fact. Hence ${\cal O}_K$ is also open. (Obviously it is an additive subgroup.)
I highly recommend becoming familiar with visualizing the topology of a local number field as a tree; see Pictures of Ultrametric Spaces (pdf) and How to picture $\Bbb C_p$ (mathoverflow question).
A: $\mathfrak m\subset \mathscr O_K$ coincides with the open unit ball of radius 1.
$$\mathscr O_K=\bigcup_{a\in \mathscr O_K}a+\mathfrak m.$$
$a+\mathfrak m$ coincides with the open ball of radius 1 about $a$.
Hence $\mathscr O_K$ is open, as it is covered by such balls.
As you point out, as a profinite set it is also compact.
The topology on a local field is Hausdorff, hence $\mathscr O_K$ is indeed closed.
