Before the discovery of the laws of thermodynamics, there was no particular reason to doubt that a physical process could continue forever - no reason, that is, save the fact that it has never been observed.
The most common design for a proposed perpetual motion machine involves a wheel with weights hanging from points on its exterior. As they fall, they pull the wheel onward about its motion, and then as they are on the other side its turning makes them rise. Then, as they mount the summit of the wheel, they flip across to the other side, providing a jolt and adding fresh momentum, continuing to propel the wheel. Such a design has been offered up by Villard de Honnecourt in the 13th century, and by the Indian inventor Bhāskara a century earlier; in Bhāskara's version, the weights were fixed tubes halfway filled with mercury, which flows to the far side at the summit.
If you don't know perpetual motion to be impossible, it's a seductive idea. Each weight can be seen lurching over and giving the wheel the push needed to keep it turning; it's apparently only the imperfect manufacture of the wheel that forces it to eventually come to a halt.
If every weight were attached frictionlessly and the axle was without friction as well, however, the wheel still couldn't spin forever, as some energy would be lost to heat with each collision of the weights into the outer part of the wheel. In reality, there are more spots to try to make move frictionlessly than a simple flywheel, and so it does not even last as long as one of those.
In the seventeenth century, such notables as Boyle and Bernoulli came up with novel designs for perpetual fluid motion. Their attempts to derive free energy at the dawn of industry may be part of what caught the eyes of the world and drew greater attention to the idea of free energy. In the eighteenth, the German inventor Johann Bessler, who styled himself "Orffyreus" (a name derived from advancing each letter of his surname halfway through the alphabet and then Latinizing), presented a great wheel covered in canvas which, once it started turning, he promised would not wind down. While his statements about how it worked were evasive, he strongly implied it was an overbalanced wheel in the same family as that of Villard.
Bessler's wheel was exhibited in November of 1717 before Karl, Prince of Hesse-Kassel, who had it sealed up in a room for a period of two weeks. On the room being opened, the wheel was found to still be turning; the room was duly re-sealed, and after a further six weeks was opened again. The wheel still turned. Either Bessler had an extraordinary mastery of low-friction bearings for his era, and between this and a large flywheel (even one with extraneous moving parts) he was genuinely able to set his device in motion for what would still today be an improbable period of time, or - vastly more probably - he faked the whole thing. His maid even testified that she was involved in turning the device from the adjoining room, although how it was actually set up and operated remains unclear.
Bessler wasn't the last to use the public's willingness to believe in perpetual motion to perpetrate a great fraud. Charles Redheffer put a machine on display in 1812 which appeared to be a generator from which other devices could be powered, yet which needed no power source of its own; on inspection, it was discovered to be operated by an accomplice in another room turning a crank.
The US Patent and Trademark Office has a simple way of blocking patents for perpetual motion and free energy, by the way - they're happy to grant one, as soon as they are shown a working model. The laws of physics ensure this will never occur, unless somebody is at least as talented a fraud as Johann Bessler.
In 1917, Garabed Giragossian invented a device which ran off a small electric motor and put out more power than it took to run. His patent application was denied, so he wrote to his congressional representatives. The House dispatched a committee to investigate, and was considering special legislation to force the PTO to grant the patent. As it turned out, however, Giragossian had confused energy with power - he was storing energy in a giant flywheel, then drawing it out rapidly for high power output. Giragossian, however, had clearly believed in his own device.
Belief in these things continues today. A lot of the mythology of modern free-energy believers relies on a conspiracy to suppress the technology. The motivation for this is often unclear - probable fraudster Joe Newman claims his "energy machine" (actually just a high-voltage, low-current DC motor) is being held back by "the polluters", making the whole thing sound like something out of Captain Planet. But this is a necessary development of the dream of perpetual motion - after all, people have to explain why, if perpetual motion is possible, anyone still burns coal.
Mitt Romney, on the campaign trail, once mentioned low-temperature fusion power generation that had been demonstrated by scientists in Utah as a form of green energy worth investing in - unaware, one assumes, that the work of Martin Fleischmann and Stanley Pons had been thoroughly debunked within months of the first announcement they made, their experiments invalid and their later work probably fraudulent. The idea of something for nothing is an ever-appealing one, and while we all know intuitively that objects and money cannot appear out of nowhere, the invisible mechanisms of thermodynamics are typically invisible to our senses - and so, while impossible, apparent plans for violations of these laws remain alluring.