Consider the set A = { 0, 1, ..., 8 }. We can identify a subset B of A with a 0-1-sequence indicating which elements of A are in B, e.g. we can identify B = { 0, 2, 5, 7, 8 } with the sequence 1, 0, 1, 0, 0, 1, 0, 1, 1. In this way the rows of the table on the left represent subsets of A, e.g. the row number 3 represents B = { 0, 1, 2, 3, 7 }. We now construct a subset D of A by switching the entries in the diagonal of the table. This diagonal is 0, 1, 0, 1, 0, 0, 0, 1, 1, and switching this sequence yield 1, 0, 1, 0, 1, 1, 1, 0, 0. This sequence represents the subset D = { 0, 2, 4, 5, 6 } of A. It is an exercise to show that D it not represented by any row of the table.
Now we can apply this diagonalization procedure (switching diagonal entries from 0 to 1 and vice versa) to an infinite table which has rows and columns for every natural number. Given any sequence B(0), B(1), B(2), ..., B(n), ... of subsets of the natural numbers N we can build such a table: Fill row number n with the infinite sequence representing B(n). Now build D as before by switching the infinite diagonal of the infinite table. Again it follows that D is not represented by any row of the table, i.e., D is different from every B(n). (It is easy to see that n is an element of D if and only if n is not an element of B(n): This gives a neat definition of D, but a table as above is better for visualizing D.)
We have just proven one of the most important theorems of set theory: A sequence B(0), B(1), ..., B(n), ... of subsets of N never consists of all subsets of N (we can always find a subset D which doesn't appear in the B(n)-sequence). In other words: The set of all subsets of N is not countable (= cannot be listed as a sequence B(0), B(1), ...).
It requires a little bit of work to relate this result to the set of real numbers R: One shows that there is a 1 to 1 correspondence between real numbers and subsets of N. But the idea of the proof of this fact is very simple: Consider the binary expansion of a real number x (between 0 and 1, say). In this form x is just an infinite 0-1 sequence which can be identified with a subset of N as above. (There are some technical problems since the expansion of x is not unique if x is a rational number.)
Thus we have shown: The set of real numbers is not countable. For every sequence x(0), x(1), ..., x(n), ... of reals we can find a real d which is different from each real x(n). (One can prove this directly using a table as above where row n consists of a decimal expansion of x(n), and d is constructed by switching the diagonal in an appropriate way, e.g. by switching 4 to 5 and everything else to 4.)
Thus the reals are uncountable: There are, in a precise sense, more real numbers than natural numbers. (In contrast, there are not more rational numbers than natural numbers: One can build a sequence q(0), q(1), ..., q(n), ... consisting of all rational numbers...)
A naive set theory allowing arbitrary comprehensions quickly leads to inconsistencies. Consider the famous Russell paradox: Let M be the set of all sets which do not contain itself as an element. Than M is an element of M and M is not an element of M, a contradiction! The solution is: We cannot allow arbitrary comprehensions. E.g. M as above cannot be a set.)
Analyzing the intuition behind the notions set and element of, Ernst Zermelo and Abraham Fraenkel gave the following system of axioms describing the element relation and the existence of sets, without trying to define set. That's the classical axiomatic approach.
It is an empirical fact that one can give (quite natural) definitions of all mathematical objects, e.g. numbers of all kinds and their operations, geometrical objects, probability spaces, etc., in terms of sets. The existence of the sets needed to do this interpretation is inferred from the axioms of ZFC using the usual mathematical reasoning. In this way set theory can serve as a frame for mathematics. It's worth noting that up to now no other theory has shown an interpretative power comparable to that of set theory.
One can go further: It is possible to formalize mathematical reasoning inside mathematics. To do this, one defines the notion of a formal proof based on a formal system of axioms. Formalizing ZFC itself opens the field for proving theorems about set theory, and, given the interpretative power of set theory, about mathematics. The following section gives an example of such a metamathematical theorem.
Here is an elementary definition of the continuum hypothesis.
Thus (CH) says that there is nothing between the natural numbers and the real numbers in terms of infinite size.
Cantor tried hard to prove (CH), but he couldn't. The reason behind this failure is the following fundamental result:
Here "proof" refers to "formal proof". The possibility of a formal definition of "proof in ZFC" blesses the results of Gödel and Cohen with a precise mathematical meaning.
Using (III) we get:
Here "proof" refers to the commonly accepted mathematical reasoning. It's the way theorem-proving is done in books, lectures, etc. The unprovability theorem says that any proof or refutation of CH must necessarily make use of principles going beyond ZFC.
Indeed there are many interesting axioms which go beyond ZFC, e.g. the axiom of constructibility and large cardinal axioms. The study of natural extensions of ZFC is one of the main areas of modern set theory. It is possible that this study will lead to a solution of the continuum problem in the following way: There might be an extension of ZFC-set theory which settles CH, and which will be regarded as "the true" extension by everyone who understands it. It is also possible that this study develops a variety of extensions of ZFC, each being natural in its on right, and none being regarded as "the true" extension.
Regardless of this, the study of extensions of ZFC is fruitful: Surprising interactions with other fields of mathematics have emerged (the area of left distributivity is an example), and a canonical axiom system for second order number theory has been identified, which might be regarded as the second order counterpart of the Peano Axioms.