In German there are three main cases - subject, object and dative. The subject is the thing which is doing something, for example in 'the girl throws the ball', the girl is the subject, because she is doing the throwing. The object has the action done to it, so in our example this is the ball. The dative means to or for, for example in 'Er gibt mir einen Hund' (He gives me a dog, mir is dative because the dog is given to me.
In German different cases have different words for a and the. For subjects they are Der, die or das for the and ein, eine or ein for a. For objects they are den die das / einen eine ein. For dative they are dem der dem / einem einer einem.