To remove impurities from water by distillation, the water is usually boiled in a chamber causing water to vaporize, and the pure (or mostly pure) steam leaves the non volatile contaminants behind.  The steam moves to a different part of the unit and is cooled until it condenses back into liquid water.  The resulting distillate drips into a storage container. 

Salts, sediment, metals - anything that won't boil or evaporate - remain in the distiller and must be removed.  Volatile organic compounds (VOCs) are a good example of a contaminant that will evaporate and condense with the water vapor.  A vapor trap, carbon filter, or other device must be used along with a distiller to ensure a more complete removal of contaminants.

The advantages of Distillation include:
A good distillation unit produces very pure  water.  This is one of the few practical ways to remove heavy metals,  nitrates, chloride, and other salts that carbon filtration can not remove. 
Distillation also removes pathogens in the water, mostly by killing and leaving them behind when the water vapor evaporates.  If the water is boiled, or heated just short of boiling, pathogens would also be killed.
As long as the distiller is kept clean and is working properly the high quality of treated water will be very consistent regardless of the incoming water - no drop in quality over time.
No filter cartridges to replace, unless a carbon filter is used to remove volatile organic compounds.

The disadvantages of Distillation include:
Distillation takes time to purify the water, It can take two to five hours to make a gallon of distilled water.
Distillers require periodic cleaning of the boiler, condensation compartment, and storage tank.
Countertop Distillation is one of the more expensive home water treatment methods, using $0.25 to $0.35 of electrical energy per gallon of distilled water produced - depending on local electricity costs.  The cost of ownership is relatively high because you not only have the initial cost of the distillation unit to consider, but you also must pay for the electrical energy for each gallon of water produced.  If it cost you $0.25 to distill each gallon, and you purified 10 gallons per week, you would pay $130 for your 520 gallons of distilled water each year.
Most home distillation units require electricity, and will not function in an emergency situation when electrical power is not available.

You might want to check  NSF International to see if the distillation system you are interested in purchasing is certified.

I have had a number of questions asking if distilled water (or water with most of the ions removed by reverse osmosis or deionization) are either bad for a person's health or beneficial for health relative to purified water that still contains ions (usually calcium and magnesium).  Click here to view my response to that question.