There has always been this idea to create free energy that would continuously supply energy infinitely. Perpetual Motion Machines are one of those prototypes that would supposedly attempt to demonstrate continuous motion infinitely. However, at some point it does not work and will always stop and run out of energy.
One of the laws of thermodynamics is that energy cannot be created nor destroyed. A machine can only produce power as it consumes. At some point it will need a source of energy to make it move. If you have seen the video above which is a perpetual motion machine, you would notice that it isn't moving at all not until an external source of energy would supply it and that would be when the hand of the guy taking the video made a push to the wheel. As the wheel is turning, it seems like it makes sense that it would keep on rotating forever but it does not because another law of thermodynamics state that as energy is transferred or transformed, more of it is wasted and it just happens that the perpetual motion machine is very good at conserving energy but it will not be able to conserve it forever. Energy within an object naturally degrades overtime just like a magnet.
If we look closely to the perpetual machine on the video, the water in the bottle causes the wheel to spin around because it gets pulled down by gravity on the left side of the wheel. At some point as it goes on, the movement of center of mass in the spinning wheel will distort the process. Each and every spinning object has a center of mass where all the weight would become equal. In the above video, the center of mass of the wheel is at the center of the wheel while it is not spinning. When the wheel starts to spin, the center of mass moves to the bottom left because that is where the weight of the water in the bottle moves. When weights are now equal then the center of mass changes in the wheel, the water's weight which is supposed to give force to continue spinning will not continue to take effect.
The video below is a good demonstration on how the center of mass a spinning object changes.