What Happens
Sugar is a carbohydrate, so when you remove the water from the molecule, you're basically left with elemental carbon. The dehydration reaction is a type of elimination reaction.
C12H22O11 (sugar) + H2SO4 (sulfuric acid) → 12 C (carbon) + 11 H2O (water) + mixture water and acid
Although the sugar is dehydrated, the water isn't 'lost' in the reaction. Some of it remains as a liquid in the acid. Since the reaction is exothermic, much of the water is boiled off as steam.
Safety Precautions
If you do this demonstration, use proper safety precautions. Whenever you deal with concentrated sulfuric acid, you should wear gloves, eye protection, and a lab coat. Consider the beaker a loss, since scraping burnt sugar and carbon off of it isn't an easy task. It's preferable to perform the demonstration inside of a fume hood.

