Deionized and distilled waters are both processed forms of water. Deionized water is produced by filtering water to the point where it is free of ions. This ion-free water will strip ions from surrounding material, acting like a super-solvent. This is often used in semiconductor and other high-tech processing as a "soft" solvent and relatively cheap cleaning fluid.
Distilled water is most often produced by vaporizing less pure source water (tap, salt or even urine) and condensing the pure water vapour. During this process, free ions from the atmosphere, containers or other sources are grabbed by the water, leaving a less aggressive fluid. Distilled water is a superior source for cooking or making soft drinks as it is pH neutral and allows the manufacturer more control over how syrups and other additives will react when mixed.
Both waters are purified water. Neither is ideal as a drinking water. If choosing one over the other, the non-drinking use must be the primary consideration.
The most common forms of water distillation involve cooking a source water (usually tap water) to produce a water vapour. This water vapour is captured and cooled to form a condensate. The condensate is distilled water. This process separates out pure water from disinfectants in tap water such as chlorine or chloramines, as well as dissolved minerals, fluoride and other trace elements found in municipal water sources. This pure water readily takes ions from its surroundings, leaving a slightly ionic, less aggressive form of purified water.
Any method of stimulating water vapour from a water source can be used for distillation. Electric heaters or steam heat exchangers are common. Placing source water into black painted pans exposed to sunlight is a "green" method of turning gray water or salt water sources into vapour for condensation. None of these techniques attempts to isolate the water vapour...