Possessive determiners show ownership or belonging (like the English "my" or "their"). They are used similarly in German and English, and therefore come before the noun they are describing.
Which possessive determiner you use depends on the "owner" (the answer to the question "Whose?"):
Of course you don't really "own" your grandfather, but it helps with understanding the grammar to think of it that way.
The case, gender, or number of the person being "owned" doesn't tell you if you should use "mein" or "sein."
However, the ending ("mein" / "meine" / "meinem" / etc.) IS determined by the thing being owned.
Possessive determiners, like all articles, have to be declined (change their form - namely, the ending).
The ending does NOT depend on the owner. Instead, it is based on the gender, case, and number of the noun that is owned (what comes after the possessive determiner).
If there is an ending after "euer," the "e" in the middle goes away.
The owner is Anna → That is third person, singular, and feminine ⇒ ihr
"Katze" is being owned:
⇒ Number: Singular (only one cat)
⇒ Gender: Feminine (die Katze)
⇒ Case: Nominative
⇒ Nominative + Singular + Feminine = ihre
A: „Das ist Jens. Sein Auto steht vor unserem Haus.“
B: „Ist Jens dein Freund?“
A: „Ja, Jens ist mein Freund. Er holt mich ab.“
B: „Na dann viel Spaß bei eurem Ausflug.“
A: „Danke, werden wir haben."
When do you use der, die, and das? Everything about the topic of gender can be found here: Articles and Gender.
Guess articles right 75% of the time even when you haven't memorized it yet! Article Trick.
When do you use der / die / das, and when ein / eine? ⇒ Definite and Indefinite Articles
Sometimes we don't use any article: The Zero Article.
Using an article to negate a noun: „Kein“.