The time machine is an object that appears in Might and Magic II: Gates to Another World. It was initially used by Corak in his efforts to stop Sheltem from destroying CRON. When Corak disappeared, the machine was sent to Lord Peabody in Castle Pinehurst.
Lord Peabody's son Sherman disappeared, so he asked a party of adventurers to find him. When the group returned with Sherman, Lord Peabody allowed them to use the time machine. The heroes went back in time to King Kalohn, bringing with them the talons he required to defeat the mega dragon. When they returned to their own time, Kalohn was sitting on the throne of CRON.
The party needs to travel to the 800s to aid King Kalohn against the mega dragon (after first visiting the Elemental Planes and retrieving the talons for his orb). Optional quests also involve going to the 600s to fight Spaz Twit, and the 700s to fight The Long One. There is no reason to go to the 500s.