Perpetual motion describes hypothetical machines that operate or produce useful work indefinitely and, more generally, hypothetical machines that produce more work or energy than they consume, whether they might operate indefinitely or not.
There is undisputed scientific consensus that perpetual motion in a closed system would violate the first law of thermodynamics and/or the second law of thermodynamics. Machines which extract energy from seemingly perpetual sources—such as ocean currents—are indeed capable of moving “perpetually” (for as long as that energy source itself endures), but they are not considered to be perpetual motion machines because they are consuming energy from an external source and are not closed systems.
There is an undisputed scientific consensus that perpetual motion in a closed system violates either the first law of thermodynamics, the second law of thermodynamics, or both. The first law of thermodynamics is essentially a statement of conservation of energy. The second law can be phrased in several different ways, the most intuitive of which is that heat flows spontaneously from hotter to colder places; the most well known statement is that entropy tends to increase, or at the least stay the same; another statement is that no heat engine (an engine which produces work while moving heat between two separate places) can be more efficient than a Carnot heat engine.
In other words:
In any closed system, you cannot create new energy (first law of thermodynamics).
The seemingly mysterious ability of magnets to influence motion at a distance without any apparent energy source has long appealed to inventors. One of the earliest examples of a system using magnets was proposed by Wilkins and has been widely copied since: it consists of a ramp with a magnet at the top, which pulled a metal ball up the ramp. Near the magnet was a small hole that was supposed to allow the ball to drop under the ramp and return to the bottom, where a flap allowed it to return to the top again. The device simply could not work: any magnet strong enough to pull the ball up the ramp would necessarily be too powerful to allow it to drop through the hole. Faced with this problem, more modern versions typically use a series of ramps and magnets, positioned so the ball is to be handed off from one magnet to another as it moves. The problem remains the same.
To extract work from heat, thus producing a perpetual motion machine of the second kind, the most common approach (dating back at least to Maxwell’s demon) is unidirectionality. Only molecules moving fast enough and in the right direction are allowed through the demon’s trap door. In a Brownian ratchet, forces tending to turn the ratchet one way are able to do so while forces in the other direction aren’t. A diode in a heat bath allows through currents in one direction and not the other. These schemes typically fail in two ways: either maintaining the unidirectionality costs energy (Maxwell’s demon needs light to look at all those particles and see what they’re doing)[dubious – discuss], or the unidirectionality is an illusion and occasional big violations make up for the frequent small non-violations (the Brownian ratchet will be subject to internal Brownian forces and therefore will sometimes turn the wrong way).
Buoyancy is another frequently-misunderstood phenomenon. Some proposed perpetual-motion machines miss the fact that to push a volume of air down in a fluid takes the same work as to raise a corresponding volume of fluid up against gravity. These types of machines may involve two chambers with pistons, and a mechanism to squeeze the air out of the top chamber into the bottom one, which then becomes buoyant and floats to the top.