Iodine exists as one of the seven diatomic molecules, in which two atoms of the element are covalently bonded together (the others being Hydrogen, Oxygen, Nitrogen, Florine, Bromine, and Chlorine.)
Molecular Iodine, in the presence of an Iodide ion, can form the anion Triiodide:
I2 + (I-) <--> I3-
in which all three Iodine atoms are lined up in row, meaning there's a bond angle of 180 degrees. That orientation occurs in the presence of the linear carbohydrate amylose, which encases Iodine atoms and forces them into a linear arrangement. This amylose-iodine complex is soluble in water, and results in a deep purple color.
By adding a reducing agent or heat, the reaction will run backwards, and Triiodide can be converted back to molecular and ionic Iodine.