There are several different notions of density in the integers. The most common is Natural Density. You can learn more at wikipedia. The idea is that you want to measure how large a subset of the integers is. One attempt is via measure theory. It turns out measure theory often works best in continuous settings, while the integers are discrete. For instance, you can't use the standard measure on $\mathbb{R}$ because the integers already have measure zero. There are plenty of other measures you can define on $\mathbb{Z}$ but it's not clear which is the best to capture number theoretic sizes like the "size" of the squares vs. all integers. Another attempt to measure size is via Baire Category, and this works well in general topological spaces. Again, we're not picking up the number-theoretic information in the integers, and that's why natural density comes into play.