If your topological space is a standard topology on , then a subset A of is compact if and only if it is closed and bounded.
More generally, if a topological space X is a compact Hausdorff space, then a subset A of X is compact if and only if it is closed. In this case, as Abstractionist mentioned, finite unions of compact sets is compact.
However, open sets can be compact sets. For example, in a cofinite topology on , compact sets are not necessarily closed sets.