Let's persue an alternate definition. A collection of sets possesses the finite intersection property if every finite subcollection of these sets has a nonempty intersection. A set S is compact if every collection of closed subsets of S with the finite intersection property has a nonempty intersection. Stated another way, every collection of closed subsets of S with no intersection includes a finite subcollection that also has no intersection. Let's tie these definitions together.
A closed set in S comes from a closed set in T, whose complement is open in T. The open sets form a cover iff the closed sets in S have no intersection. The finite subcover corresponds to a finite subcollection of closed sets with no intersection. This is exactly what we said in the last paragraph, hence the definitions are equivalent.
We will see that most compact sets are closed, but this isn't required. In the indiscrete topology, where only the empty set and the entire space are open, every subset of the space is compact.
The finite union of compact sets is compact. Given an open cover for all of them, select a finite subcover for each compact set, and the union of these subcovers remains finite.
Let f be a continuous function on the domain T, and let Y be the image of S. Assume T is compact. An open cover of Y pulls back to an open cover of S. The resulting finite subcover maps forward, through f, to a finite subcover of Y. Thus the continuous image of a compact set is compact.
You might think that we should begin by proving that the closed interval [0,1] is compact. Then we can extend this to paths, the continuous image of [0,1]. Next, the product of unit intervals makes unit cubes in n dimensions. We ought to be able to prove those are compact, eh? then any closed set embedded in a hypercube is compact, and we finally have the long sought theorem: a closed bounded set in Rn is compact.
This is the approach I would take, but as it turns out, it's darn hard to prove [0,1] is compact from first principles. It's actually easier to solve a more general problem, then apply the result to a specific case such as the unit interval. That is what we are going to do. We'll see how compact sets behave in a hausdorff space, then a metric space. Related concepts such as countably compact and sequentially compact are necessary stepping stones along the way. Finally, we will characterize compact sets in arbitrary metric spaces, and when this is applied to Rn, the criteria becomes "closed and bounded". Finally, the fact that [0,1] is compact is almost a corollary.
Let's begin with hausdorff spaces.