Does topology apply to the integers?
"The integers" refers to not just a set, but a whole suite of other notions, such as the usual addition and multiplication operations.
Among these notions, there is, in fact, a topology. The usual topology on the integers is the discrete topology — the one where every subset is an open set.
One thing that needs to be internalized is that, when taken at face value, the question "Is $S$ an open set?" is utter nonsense. The meaningful questions are of the form "Is $S$ an open set in the topology $T$?"; it's just that we usually don't mention $T$ when it can be understood from context.
Anyways, one way to explain why the usual topology on the integers is that discrete topology is because that is the subspace topology relative the usual topology on the real numbers. That is (presuming $\mathbb{Z} \subseteq \mathbb{R}$),
$U \subseteq \mathbb{Z}$ is an open set${}^1$ if and only if there is an open set${}^2$ $U' \subseteq \mathbb{R}$ such that $U = U' \cap \mathbb{Z}$.
1: in the usual topology of the integers
2: in the usual topology of the real numbers
Since the usual topology on $\mathbb{R}$ can be desribed in terms of a metric, e.g. $d(x,y) = |x-y|$, the usual topology on $\mathbb{Z}$ is given by the same metric. But note that for any point $P$, the open ball of radius $1/2$ around $P$ is just the set $\{ P \}$, and consequently $\{P \}$ is an open set.
As the other answers and comments indicate, there are other topologies that are useful to put on the natural numbers.
It is clear that if you look at the topology on $\Bbb Z$ induced by the natural (Euclidean) metric on the real line you get the discrete topology: every subset is open. This is not so exciting.
But that's not forced: you can define other topologies that turn out to be more interesting and useful.
An important metric that one can define in $\Bbb Z$ (actually on $\Bbb Q$)is the $p$-adic metric which requires fixing a prime number $p$ beforehand and whose basic idea is that numbers that are highly divisible by $p$ are "small", i.e. close to $0$. There's a vast literature on the $p$-adic numbers, which are what you get completing $\Bbb Q$ under the $p$-adic metric, pretty much in the same way one can construct $\Bbb R$ as the completion of $\Bbb Q$ under the Euclidean metric.
As another example you can consider the topology in $\Bbb Z$ whose closed set are those generated by the arithmetic progressions containing $0$.
Then you can use this topology as follows: consider the union of all non-trivial closed sets. It is easy to check that this union is $$ \bigcup_{p\ \text{prime}}\{...,-2p-p,0,p,2p,...\}= \Bbb Z\setminus\{1,-1\}. $$ Since it is the complementary set of a finite subset it cannot be closed (all basic open sets are infinite for this topology). Thus the union cannot be a finite union. Hence we proved that $$ \text{there are infinitely many primes.} $$
I think you are relying on the geometric interpretation of an open set in the case of $\mathbb{R}^n$ too much. You should think about the fact that open sets in $\mathbb{R}^n$ are derived completely from the metric on the space. Remember that a topological space $(X,\tau)$ is just a set $X$ paired with sub-collections of $X$ that obey a few axioms. If you wish to put a topology on $\mathbb{Z}$, consider the most trivial one, namely the discrete topology i.e $\{i\} \in \tau$ i.e open for all $i \in \mathbb{Z}$.