*Thou* is the subjective form (equivalent of third person *he* or *she* or first person *I*). *Thee* is the objective form (equivalent of third person *him* or *her* or first person *me*). *Thy* is the possessive form (equivalent of third person *his* or *her* or first person *my*).
The easy way to remember it is that *thy* matches *my* and *thee* matches *me*. If text is old-fashioned enough to be using *thou* then it may have an additional use for thine/mine besides the one we still use today – if thy/my is followed by a word starting with a vowel sound then an "n" sound is added in the middle (same as we still turn *a* into *an*) and that will be spelt thine/mine.