This is a question with rather a long history. As early as 1929, the Hungarian writer Frigyes Karinthy speculated that anyone in the world could be connected to anyone else through a chain consisting of no more than five intermediaries. Because the last person in the chain, who we call the target, does not count as an intermediary, five intermediaries is equivalent to six degrees of separation. The first scientific exploration of what was to become known as the "small-world problem" came almost three decades later in the work of Manfred Kochen (a mathematician) and Ithiel de Sola Pool (a political scientist), who proposed a mathematical explanation of the problem. Assuming that individuals choose 1,000 friends at random from a population as large as 100 million, Kochen and Pool showed that no more than two or three intermediaries (hence three or four degrees of separation) would be required to connect any two people. People, however, do not choose friends at random, which implies that the real answer should be higher. Kochen and Pool realized this, but were unable to solve the more difficult problem.
Stimulated by Pool and Kochens work, the great social psychologist Stanley Milgram devised an ingenious experiment in the late 1960s to test the hypothesis. Milgram and his graduate student Jeffrey Travers gave 300 letters to subjects in Boston and Omaha, with instructions to deliver them to a single target person (a stockbroker from Sharon, Mass.) by mailing the letter to an acquaintance who the subject deemed closer to the target. The acquaintance then got the same set of instructions, thus setting up a chain of intermediaries. Milgram found that the average length of the chains that completed (64 of them) was about six--quite remarkable in light of Karinthys prediction 40 years earlier. Since Milgram, the small-world problem has become a cultural phenomenon, especially after the playwright John Guare chose the catchy term "six degrees of separation" as the title of his 1990 play. But until recently, very little empirical work had been done aside from Milgrams initial experiment, and no one could explain why it worked.
Some recent theoretical work suggests that the answer may or may not be six, but it is certainly small--not 100, for example. A very large scale e-mail version of Milgrams experiment, currently being conducted at Columbia University (see link above), might settle the matter once and for all. But for now, it remains a mystery.