The Infinite Engine was a creation of the Thirteen Darkness, a device of such great supernatural power that if used correctly, could be used to overthrow the Light in a great many different ways. In basics, it is a form of semi-perpetual power, and under the right conditions could generate infinite energy.
The Infinite Engine was created by the ancient Dark Empire, itself being the bastion of marvels of engineering of that time, the Infinite Engine was a side-project that the Dark Emperor and his twelve Lieutenants all pitched in to work upon.
The Dark Emperor sought to give it an ultimate source of energy, that when bound to a Dark Keyblade, would activate. To this end, he collected the Hearts from Heartless slain during the early half of the Keyblade war. He took these hearts, combined them and compressed them, fused them into a single entity.
The other twelve Darkness also aided in its creation, creating the device itself to appear bio-organic, a mixture of machine and Darkness. Then, the Twelve added their own platforms in an encirclement, from where a powerful heart would each be placed.
The Infinite Engine is capable of great and terrible power, enough that the Rebels would authorize the most learned Keyblade Masters in their ranks to bypass the siege on the Emperor's Fortress, rather than allow the Emperor time to complete his plans with the device.
For every corrupted world linked to the Heart of the Machine's Master, a giant heart will symbolically appear on one of twelve the platforms, that circle the Engine's core in a ring. For each World heart bonded to the machine, the power potential of the machine multiplies, the circuit becoming complete when twelve giant hearts circulate the core.