Perpetual motion machines (which don’t exist) come in many forms.
Perpetual motion machines of the first kind violate the First Law of Thermodynamics. They produce mechanical work (i.e. movement) without any energy being input; this violates the principle of the conservation of energy.
Perpetual motion machines of the second kind violate the Second Law of Thermodynamics. They convert thermal energy directly into mechanical work, with no exhaust heat being emitted; this violates the rule of the production of entropy, that entropy in a system must always increase.
Perpetual motion machines of the third kind do not, as their name suggests, violate the Third Law of Thermodynamics. Rather they claim to maintain motion (once started) forever, and do so by assuming that frictional forces can be eliminated completely (often through operating in a perfect vacuum, which is also not possible).