In very old texts, sometimes the letter і is used, but it has been replaced by и in modern spelling.
I, like many others, learned modern orthography, so I don't understand why sometimes і is used, and sometimes и. As far as I know, they both represent the same phoneme, so I don't see what the motive was for having two separate letters.
Suppose I travel back in time, and need to know when to use which letter. How do I know when to use і, and when to use и?