German nouns and their articles change form depending on their job in the sentence — this is called "case" (der Fall). At A1 you'll meet three cases, and it's important to learn them in order, since each one builds on the last.
Types you should know
der Nominativ
the subject — who or what is doing the action
der Akkusativ
the direct object — who or what receives the action
der Dativ
the indirect object — to/for whom something is done
Memory trick: Ask three questions in this order — "Who's doing it?" (Nominativ) → "What's receiving it?" (Akkusativ) → "To/for whom?" (Dativ). That's the exact order you'll learn them in, and the exact order most sentences build up in.