Hi
They are both water that has had impurities removed making them cleaner from organic contamination.
The only difference is the method of purification.
Distilled water is boiled into steam (which is then collected) removing the solid contanimates behind and has a very low electrical conductivity.
Deionized water is more complex as it involves the removal of mineral ions by filtering it through ion exchange resins.
This removes calcium, iron, copper etc but does not always filter bacteria.
However both are considered to be a very pure water and are usually drinkable if done properly.
Hope that helps.
Matthew