"He has a key."
Translation:Er hat einen Schlüssel.
Can someone please explain when do we use ein/eine/einen? Really confused. :/
Ein changes its ending according to the gender and case of the noun it describes. Here, Schlüssel is masculine (it's der Schlüssel) and accusative (it's the direct object of hat), so it's einen Schlüssel.
If it had been, for example, "A key is black", it would still be masculine (gender never changes) but would now be nominative (it is the subject of the sentence), so it would ein Schlüssel).
If it had been "She hits him with a key", that would be dative (with = mit which always takes the dative) which is einem Schlüssel.
The full table of ending changes for ein is here in the Wikipedia article: http://en.wikipedia.org/wiki/German_articles#The_Indefinite_Article
How do I know what gender a word is? (Other than obvious ones like Frau, Mann, or Kind)
Thanks for this post. It gets no hits on google if looked up. Welcome to the deep web.
gorn61 is right.
The principle has to do with what is happening in the sentence and to whom or what (and the gender of that 'whom or what'. (It has nothing to do with the verb tense.)
I had to go back to some English grammar principles because I was soooo confused. I am still confused, but at least I have an understanding of why things change. I used these sites to help me.