Contrary to Hollywood, you wouldn’t explode. Lack of oxygen in the blood is what would kill you, but it would take about two minutes.
At most, an astronaut or person without a suit would last about 15 seconds before losing conciousness from lack of oxygen. (That's how long it would take the body to use up the oxygen left in the blood.) After that? You will die from asphyxiation or the effects of the pressure reduction.
First of all, if you're thinking of holding your breath once outside that space ship - don't! Holding your breath is not a good thing to do, according to NASA. This will result in rupturing of the lungs, with almost certainly fatal results. There is a good reason that it is called "explosive" decompression.
On a space station orbiting Saturn, a man inside a punctured spacesuit swells to monstrous proportions and explodes - remember the movie 'Outland'? On Mars, the eyes of a man exposed to the near-vacuum of the martian atmosphere, pop out of his head and dangle by their optic nerves on the sides of his face - remember 'Total Recall'? Enroute to jupiter on the Discovery spacecraft, Astronaut Dave Bowman space walks for 15 seconds with no helmet, and in no apparent pain, succeeds in reentering the Discovery through an open hatch - remember '2001:A Space Odyssey'? Fortunately, only in science fiction stories do humans ever come into direct contact with the vacuum of space, but these contacts are often portrayed as having horrific consequences.
So How Long Can a Human Live Unprotected in Space? To experience the vacuum is to die, but not quite in the grisly manner portrayed in some of the movies above. The truth of the matter seems to be closer to what Stanley Kubrik had in mind in 2001: A Space Odyssey.
If you don't try to hold your breath, exposure to space for half a minute or so is unlikely to produce permanent injury. Holding your breath is likely to damage your lungs, something scuba divers have to watch out for when ascending, and you'll have eardrum trouble if your Eustachian tubes are badly plugged up, but theory predicts -- and animal experiments confirm -- that otherwise, exposure to vacuum causes no immediate injury. You do not explode. Your blood does not boil. You do not freeze. You do not instantly lose consciousness.
Various minor problems (sunburn, possibly "the bends", certainly some reversible, painless swelling of skin and underlying tissue) start after ten seconds or so. At some point you lose consciousness (roughly, after 15 seconds), from lack of oxygen. Injuries accumulate. After perhaps one or two minutes, you're dying. The limits are not really known.
You do not explode and your blood does not boil because of the containing effect of your skin and circulatory system. You do not instantly freeze because, although the space environment is typically very cold, heat does not transfer away from a body quickly. Loss of consciousness occurs only after the body has depleted the supply of oxygen in the blood. If your skin is exposed to direct sunlight without any protection from its intense ultraviolet radiation, you can get a very bad sunburn.
At NASA's Manned Spacecraft Center (now renamed Johnson Space Center) we had a test subject accidentally exposed to a near vacuum (less than 1 psi) in an incident involving a leaking space suit in a vacuum chamber back in '65. He remained conscious for about 14 seconds, which is about the time it takes for O2 deprived blood to go from the lungs to the brain. The suit probably did not reach a hard vacuum, and we began repressurizing the chamber within 15 seconds. The subject regained consciousness at around 15,000 feet equivalent altitude. The subject later reported that he could feel and hear the air leaking out, and his last conscious memory was of the water on his tongue beginning to boil.
Aviation Week and Space Technology (02/13/95) printed a letter by Leonard Gordon which reported another vacuum-packed anecdote:
"The experiment of exposing an unpressurized hand to near vacuum for a significant time while the pilot went about his business occurred in real life on Aug. 16, 1960. Joe Kittinger, during his ascent to 102,800 ft (19.5 miles) in an open gondola, lost pressurization of his right hand. He decided to continue the mission, and the hand became painful and useless as you would expect. However, once back to lower altitudes following his record-breaking parachute jump, the hand returned to normal."
To Sum It All Up...
The human body can briefly survive the hard vacuum of space unprotected, despite contrary depictions in some popular science fiction. Human flesh expands to about twice its size in such conditions, giving the visual effect of a body builder rather than an overfilled balloon. Consciousness is retained for up to 15 seconds as the effects of oxygen starvation set in. You have roughly under 2 minutes after that for any chances of survival.
No snap freeze effect occurs because all heat must be lost through thermal radiation or the evaporation of liquids - heat leaves the body very slowly in a vacuum, and the blood does not boil because it remains pressurized within the body. The greatest danger is in attempting to hold one's breath before exposure, as the subsequent explosive decompression can damage the lungs. These effects have been confirmed through various accidents (including in very high altitude conditions, outer space and training vacuum chambers).
Human skin does not need to be protected from vacuum and is gas-tight by itself. Instead it only needs to be mechanically compressed to retain its normal shape. This can be accomplished providing you have a tight-fitting elastic body suit and a helmet for containing breathing gases - in other words, a Space suit! Good Luck!
wikipedia, http://imagine.gsfc.nasa.gov/docs/ask_astro/answers/970603.html, slate.com