A pipe dream is essentially a fantastic plan or scheme which has little to no chance of succeeding under real world conditions. An inventor may dream of creating a perpetual motion machine which would never run out of energy and power our homes forever. The invention of such a machine would no doubt be seen as revolutionary by the scientific community, but the realities of such things as friction, Newtonian physics and gravity make such a thing impossible. A perpetual motion or time traveling machine is presently doomed to remain a pipe dream for would-be inventors.
A pipe dream can also be social in nature. Someone with a romantic infatuation may have such a dream of marrying the object of his or her affections and raising a large family. In reality, that future bride or groom may not even be aware of these fantasy-based plans, or otherwise show no interest in pursuing such a relationship. Fulfillment of a romantic dream may not be completely out of the question, but the chances of a successful outcome are notoriously slim. Most pipe dreams remain squarely in the realm of fantasy.
The origin of the phrase pipe dream can be traced back to the beginning of the 20th century. Opium dens and other houses of ill repute offered paying clients a chance to inhale opium or other hallucinogenic drugs through communal hookahs or water pipes. Frequent visitors to these illegal operations were said to be "on the pipe," hopelessly addicted to opiates and notably disconnected from reality.
By extension, any fanciful plan or lofty aspiration could be written off as a dream inspired by opium, thus becoming a pipe dream. Such a dream could not be taken very seriously by the sober-minded citizenry, even if the dreamer was completely sincere in his or her beliefs. The act of describing a plan or scheme as a "pipe dream" is almost always dismissive.
Some people actually do succeed in turning an alleged pipe dream into a reality, but quite often in history one person's unrealized dream becomes a future generation's reality because of technological advances made along the way. Inventions such as television, motion pictures and the Internet may all have started out as the dreams of earlier scientists and visionaries.