Any device which violates first law or second law of thermodynamics is called a perpetual motion machine (PMM). These devices operate under the principle of sustained or perpetual motion. That is, the machine will continuously perform same function repeatedly without stopping.
Perpetual motion machine can be of two types:
PMM-1: Perpetual motion machines of first class does work without intake of energy, thus violate the first law of thermodynamics.
PMM-2: Perpetual motion machines of second class is an engine without any heat rejection or a refrigerator without work input, thus violate second law of thermodynamics.
Despite of numerous attempts, no perpetual motion machines is known to have worked in nature.
Some GIFs that make us believe perpetual motion machines a reality
If construction of perpetual motion machine is possible in nature then we could generate free energy, no need to worry about fuel and pollution problems.
all the above animations are just computer edited gifs