A topology which cannot be obtained by a distance function
Try showing that metric topologies are Hausdorff and that this topology isn't.
As mentioned above, the topologies you want are those which are not metrizalbe. There are several metrication theorems that are given in terms of separation properties of the spaces.
- A space is first countable if every point has a neighborhood basis
- A space is second countable if it has a countable basis
All metric spaces are first countable, so if your space is not first countable then it is not metrizable.
Probably the most commonly known theorem is Urysohn's metrization theorem: every second countable, regular, Hausdorff space is metrizable. Hausdorff just means that points can be separated by open sets and regular means that (nonempty) closed sets and points can be separated by open sets.
A more powerful condition is that of normality. A space is normal if disjoint closed sets can be separated by open sets. It turns out that all metrizable space are normal.
At first glance, these non-metrizable spaces just seem like pathological examples, but some are very important. For example, the Zariski topology is not metrizable, but is essential to the field of algebraic geometry.
Your topology is called the finite complement topology of the real line: http://en.wikipedia.org/wiki/Finite_complement_topology . To show that it's not Hausdorff, try to intersect any two open sets -you don't even need the points of the Hausdorff definition-, remembering the rule
$$ (X \backslash A ) \cap (X \backslash B) = X \backslash (A \cup B) \ . $$
Having any Topology standard book at hand, like Munkres, might help your self study. For instance, I'm quite shure that the proof that every metric space is Hausdorff can be found there.