The two definitions of a compact set 
*
* In general, $A$ is compact if every open cover of $A$ contains a finite subcover of $A$.

* In $R$, $A$ is compact if it is closed and bounded.

The second is very easy to understand because I can easily come up with an example like $[0,1]$ which is both closed and bounded so it's compact.
However, I am very confused at definition (1) because I don't really understand what is meant by a cover and I don't understand how this is really related to a set being closed and bounded?
Could someone please explain what is the relationship between (1) and (2)?
Thank you.

Let $X \subset R$ 
1) Compact => bounded.
I find it easy to just do this.  For every $x \in X$ let $V_x = (x-1/2, x + 1/2)$.  $V_x$ is open and $X \subset of \cup V_x$. So {$V_x$} is an open cover.  So it has a finite subcover.  So there is a lowest interval  and there is a greatest interval in the finite subcollection of intervals and X is bounded between them.
2) Compact => closed
Let X not be closed.  Then there is a limit point,y, of X that is not in X.  Let's let $V_n$ = {$x \in \mathbb R| |x - y| > 1/n$}.  As this covers all $\mathbb R$ except $y$ and $y \not \in X$ it covers X.  Take any finite subcover the is a maximum value of $n$ so $(y - 1/n, y + 1/n)$ is not covered by the finite subcover.  As $y$ was a limit point, $(y - 1/n, y + 1/n)$ contains points of X.  So the subcover doesn't cover X.  So X is not compact.
Unfortunately Closed and Bounded => compact is much harder.
But I hope I gave you a sense of the flavor of compact sets.
