The answer is: for $n = 1$ there are exactly two components and for $n > 1$ this set is connected. I suppose that there are a lot of ways to prove it, and below is the shortest that I can come up with. It relies on only one non-trivial fact, namely that matrices with positive determinant constitute a connected set.
Assume that $n > 1$. Let $S = \{A \in \mathbb R^{n \times n}: A^2 \ne 0\}$, $\mathrm{GL}_+ = \{A \in \mathbb R^{n \times n}: \det A > 0\}$. It is well-known that $\mathrm{GL}_+$ is connected and its closure coincides with the set of all matrices with nonnegative determinant. Therefore, $\mathrm{GL}_+$ is connected and dense in $S_+ = \{A \in S: \det A \ge 0\}$. Thus, $S_+$ is connected. Similarly $S_- = \{A \in S: \det A \le 0\}$ is also connected. The connectedness of $S$ follows from the fact that $S_+$ and $S_-$ have non-empty intersection (here is the only moment were it is important that $n > 1$).