It’s called a “tittle.” The “i” got it’s dot sometime during the 13th century, during the period of copying of manuscripts. The “i” was made with one stoke and other letters were made with two and three strokes……the dot was used to distinguish the “i” from other letters. The dot is not a diacritical mark — it does not change the way letter is pronounced. The “i” and the “j” were indistinguishable in usage until the 1600’s, they used the same character, the single slash…. again the lower case was given the dot to distinguish it, and the upper case came to be invented with the invention of type.
Now you know.