Thou was the singular second second person subject word, but thee was the singular second person object. So usage would be like "thou are talking to me" or "I am talking to thee."
Ye was the plural second person subject, and you was the plural second person object. So instead of like "y'all are talking to me" now, you could say "ye are talking to me". Or "I am talking to you" which would be referring to me talking to more than one person (not just one person like you'd think with modern usage of the word).
Doubly confusing because for singular the word ending in the "e" sound is the object pronoun, and for plural is the subject pronoun.
The word "you" eventually took over all these usages and is used for both subject and object now, and it's mostly just used to mean singular now. We don't really have a word for plural second person outside of using multiple words to clarify like "y'all" or "you guys." We still have many other pronouns with the subject object divide though like "I" vs "me," "he" vs "him," or "who" vs "whom."