I think what you're confusing is the different uses of the word "closed". In calculus, analysis and topology, a subset $A$ of a space $X$ can be closed. Depending on the author, and the "strictness" of language involved, this usually means either of the three following:
- Boundary points of $A$ are included in $A$.
- Any sequence of points in $A$ which converges to a point in $X$ converges to a point in $A$.
- The complement $X\setminus A$ is open.
However, whenever you have an operation ("structure") on any set $A$, we say that $A$ is closed under this operation if applying the operation doesn't take you out of the set. For instance, the natural numbers aren't closed under subtraction, but the integers are. The integers again aren't closed under division, but the rational numbers are.
If the set $A$ is a closed subset of a space $X$ (as in the first paragraph), then it is for instance closed under the operation of closure (basically adding all the boundary points; if they're all in $A$ already, then it won't change anything), and under limits.
The interval $[0, 1]$, then is closed. The boundary points are $\{0\}$ and $\{1\}$, and they are part of that interval. If you have a converging sequence $x_i$ with $0 \leq x_i\leq 1$ for all $i$, then it cannot converge to a negative number, or to a number greater than $1$, so taking the limits keeps us inside our interval.
The interval $(0, 1)$ is not closed, since the boundary points are not part of the interval. Also, for instance the sequence $x_i = \frac{1}{i + 1}$ fulfills $x_i \in (0, 1)$, and it does converge, but the limit of the sequence is not contained in $(0, 1)$.
Now, for compactness, at least on the number line, in the plane, and so on (the Euclidian spaces, collectively known as $\Bbb R^n$), a set is compact iff it is closed and bounded. For general metric spaces, you need to change "bounded" to "totally bounded", and in general topology, the concept of "bounded" doesn't even make sense.
In topology and analysis, there are several very nice properties of finite sets of points which are better preserved in general by compact sets than countable, even though compact sets are not intrinsically limited in the number of points they can contain. For instance, if you have a continuous function from a space $X$ to the real number line, then if $X$ is compact, $f$ obtains a true maximum and minimum value. That would not neccessarily be the case if $X$ was countable instead.