When I have to use meinem, and when meine?
find a grammar book or site and look up the possessive pronouns. You will see, that the ending -em or -e depends on the case and the gender and singular/plural of the noun it is attached to. Far too much to explain here.
i checked the site. It will do, because it is concise. Not quite what I would have written, but you know, what teacher doesn't believe he can do a better job at explaining? @ mohammadamin: use the site, it is okay.
It depends on the case and the gener. "Meinem" is used when it's Dativ and masculine o neuter, i.e. "ich fahre mit meinem Fahrrad", why? because "mit" is a dativ preposition and "Fahrrad" is neuter. On the other hand, "Meine" is used when it's nominativ or akkusativ with feminime or plural, i.e: "Meine schöne Hose", why?, beacuase it's Nominativ and "Hose" is feminine.