Time machine
Time Machines are special devices that allow people to travel through time. Four time machines have appeared throughout the Mario series of games and cartoons.
The Time Tube
The first time machine appeared in The Adventures of Super Mario Bros. 3 episode "Toddler Terrors of Time Travel", in which Kooky von Koopa built a device known as the Time Tube. It was built in order to allow travel to the past and prevent the Mario brothers from finding their way into the Mushroom Kingdom, allowing Bowser to take over without hinderance.
However, the Time Tube malfunctioned during its journey to the past, causing Mario, Luigi, Toad, and the Koopas to rejuvenate back into infancy. When the Mario brothers and Toad escaped in their baby forms, Kooky repaired the Time Tube and restored himself and Bowser to their proper ages so they can carry out their plans. Before they had succeeded in preventing the Mario brothers' arrival, Toad stole the Time Tube and then restored himself and the Mario brothers back into adulthood. The Mario brothers were able to open and enter the gate into the Mushroom Kingdom before the timeline became permanent, thwarting Bowser and Kooky's plans.
The Timulator
The second time machine, called the Timulator, was built by Bowser during the events of Mario's Time Machine. The time machine has three settings: the City, the Date, and the Epoch (BC or AD). Once a destination is set the user then is required to surf through the fabric of time, collecting Mushrooms. Once enough Mushrooms are collected the user then enters a portal and is sucked into the destination programmed in the Timulator. If the user enters a portal too soon or has set a destination not within the game's story (e.g. Menlo Park in 2001 AD), the user is dumped back in 1993 (the present). The Timulator also comes with a remote control device, which at the press of a button returns its user to 1993 from any area in time.
Bowser initially used the Timulator to travel to significant points of human history on Earth, and snatch various artifacts to display in his museum within his castle, including the Declaration of Independence and Joan of Arc's shield. Mario gained control of the Timulator to return the items to their proper places in the timeline before the timeline would've changed forever. After Mario succeeded in restoring history back to normal and tracked down Bowser, Bowser attempted to use the Timulator and escape to an area of time known as "Paradise", but the machine overloaded, self-destructed and catapulted Bowser into the Jurassic era, where he was quickly stomped on by a Tyrannosaurus Rex.
E. Gadd's Time Machine
The third Time Machine was invented by Professor E. Gadd in Mario & Luigi: Partners in Time. Not much has been explained how it works, other than it is powered by a magnificent gem called the Cobalt Star; and moves through time by opening Time Holes.
During its showcasing at Princess Peach's castle, the princess used it, along with Toadiko and Toadbert to visit the Mushroom Kingdom's distant past. She unfortunately came into the time in which the kingdom was invaded by the Shroobs. The Cobalt Star was then destroyed in order to trap the Elder Princess Shroob, and with a last bit of energy a Junior Shrooboid transported back to the present, wrecking the Time Machine and rendering it useless. The Time Machine's return however temporally opened a Time Hole in the castle garden, allowing Mario and Luigi to step back into the past Mushroom Kingdom. The Time Machine was later re-engineered to run off of the energy illuminating from the numerous Time Holes in the castle, allowing the Mario brothers to safely return to the present. The last use of the Time Machine was by Baby Mario, Baby Luigi, Baby Peach, and the younger Toadsworth in their farewell back to the restored past.
The Warpulator
The fourth time machine is the Warpulator, which is possessed by Stuffwell, another invention of E. Gadd. The Warpulator has the power to reverse the flow of time and send individuals to an predestinated point, bringing with them all their current inventory and stats. The Warpulator is only used near the climax of the game, where the Mario brothers are trapped in a point of no return and must face battle with Princess Shroob, so they can go back and do any tasks they might have missed. It can also be used after the elder Princess Shroob was defeated, at the price of reversing the victory over the Shroob empire.