Get it put back in, and soon. The longer you remain in this rare condition—known as globe luxation—the more strain you'll put on the blood vessels and nerves that connect your eye to the rest of your head. Your luxated globes will also be susceptible to corneal abrasions or inflammation, and the feeling of your eyelids clamped down behind them won't be pleasant.
You should be able to get your eye back in place without serious, long-term damage. (If the ocular muscles tear or if the optic nerve is severed, your outlook won't be as clear.) The treatment for globe luxation is pretty simple: Doctors apply some topical painkillers, hold back your lashes, and poke your eyeball into its socket by pressing on the white part with gloved fingers. (In some cases, they'll use a simple tool like a bent paperclip to shoehorn it back into place.) You might get antibiotics, lubricating drops, or steroids to follow up for a few days while your vision returns to normal.
If your eyeballs fall out of their sockets repeatedly, you might be a candidate for a lateral tarsorrhaphy—in which doctors sew up your eyelids part of the way to keep them from opening too wide. You could also learn the following technique for popping your eye back in yourself: First direct your gaze downward. Now pinch and pull your upper eyelid with the thumb and index finger of one hand. Lay a finger from your other hand on the top part of your luxated eyeball, taking care to press only on the insensitive white part. While you continue to hold your eyelid up, push your eyeball gently down and back at the same time until it's part of the way in. Then try to look upwards; if everything goes right your eyeball will rotate under the upper lid and back into its socket.
This has been a public service announcement.