Distilled water is made by continuous distillation of a water source. It is distilled a second and even a third time. But there is no guarantee that it is contaminant-free. In fact, distilled water is almost never fully pure. It will absorb molecules from everything it meets including air.
On the other hand, Milli-Q water is made by passing the source water through mixed bed ion exchange and organics (activated charcoal) cartridges. Milli-Q water should be sterile provided that the filters are functioning, and the tubing is sterile and without mold spores. If Milli-Q water is used for tissue culture it is better to pass it through a 0.2um filter.
Ultrapure water (UPW) is the water that has been purified to high levels of specification. As a standard, the water contains only H2O, as well as balanced number of H+ and OH- ions. Ultrapure water reaches the theoretical ideal levels of purity, with a resistivity of 18.2 MΩ.cm, TOC < 10 ppb and bacterial count