The Cosmic Cap is used by Mighty Max for teleportation to new worlds. He must complete a certain mission in order for the Cosmic Cap to be re-activated and teleport him to safety.
In the animated series, the cap acts as the key for a network of portals allowing quick transportation around the world. The portal opens whenever the cap is nearby the opening, but the portals only work in one direction. That is, once he arrives at his destination Max can't open the portal again and use it to return to where he originally was.