I have never heard anybody using it, I only came across the word in the title of the movie Honor Thy Mother
This is a quotation from the best-known translation of the Christian Bible, the 'Authorized Version' or 'King James Version':
Honor thy father and thy mother.
Possessive thy and the subject/object forms thou/thee are old forms which are no longer used in Standard English, and are dying out even in the dialects where it has survived. In ordinary uses it is today restricted almost entirely to religious contexts, where it employs the diction of the KJV; to works of historical fiction which imitate older language; and to translations from languages which maintain morphological or lexical distinctions between singular and plural and/or familiar and formal in the second person. It is very unlikely that you will ever have occasion to use it.
When can I use “thy” instead of “your”?
When? Pretty much anytime before about the year 1780.
In all seriousness, "thy" (and its other forms like "thou", "thee", and "thine") is the equivalent of "tú" (in Spanish) or "du" (in German). It is just the familiar form.
Unlike every other Indo-European language, we stopped using the familiar form about 200 years ago, except when we are deliberately attempting to invoke an archaic ambiance, suggesting Shakespeare or the King James Version of the Bible.
A key thing not mentioned in the other answers is that thou, thy, thee, thine is the informal version of you, or at least many years ago it was. In the same way that in french we have tu and vous, which can both mean you in the singular, so in english there was thou and you. In french you have to be really careful when to use tu and vous, because to say tu to someone in the wrong context is very rude. It is more respectful to say vous.
In the North of England it persists a bit - the phrase "t'art" is short for "thou art", which is equivalent to "you are".... e.g. "t'art right useful" where right in this context means very.
So if you want to use "thou" or "thee" it should be to one person in a familiar context in speech from about 200 or more years ago.
These days if someone uses thou it sounds a bit odd and more formal, which is not at all its original meaning, which is why in Romeo and Juliet there is the line from Juliet of "Romeo, o Romeo, wherefore art thou, Romeo" - - which translated is "Romeo, o Romeo why are you Romeo" (why a Montague and not a Capulet (like me) - thanks to all who pointed out my mistake - many apologies...)- Note that it is uses the very familiar intimate version of you because of the intimate relationship between Romeo and Juliet.
edit - so I messed up in my original answer and thought wherefore=where, but it does mean why.... sorry
If you were quoting someone from Yorkshire, you could use the modern equivalent 'thee'. From personal experience it exists more as a stereotype than actually being common usage, but there are still people that do it.
Use of the singular second-person pronoun thou (often written tha) and thee. This is a T form in the T-V distinction, and is largely confined to male, mostly older speakers.
As others have mentioned before me, thy is only used in historical and religious texts, or fiction which takes place in older times (usually medieval times). So unless you’re going to write a historic fiction story which takes place in medieval England, you’re probably not going to use it.
I think this article on Shakespearean English explains the use well. It gives the following example from Romeo and Juliet:
Deny thy father and refuse thy name;
Furthermore, this Shakespearean English can also be used in role-playing (games). However, most people would probably find it silly and/or too cumbersome to do so.