"The lion is behind the elephant."
Translation:Der Löwe ist hinter dem Elefanten.
Do a search for the four 'German Cases', Nominative, Accusative, Dative and Genitive. You may not know what they mean, but at level 25 in German you will already be unconsciously following the rules. As for the 'Elefanten' issue, look up Weak Nouns (the "N-Declension"). Just an extra bit of confusion regarding the German language :)
Why is it 'dem' Elefanten?
hinter is one of the two-way prepositions that require the dative case when talking about a location and the accusative case when talking about the destination of motion.
Here, the lion is behind the elephant (location) and so we need the dative case after hinter.
der Elefant is masculine, so you need masculine dative dem and dative singular Elefanten.