The life of an animal: das Leben eines Tieres
The life of the animal: das Leben des Tieres
The life of the animals: das Leben der Tiere
leben (no capital) L: to live
An animal is alive: ein Tier lebt.
The animal is alive: das Tier lebt.
The animals are alive: die Tiere leben.
Animals are alive: Tiere leben.
You are right that the German word for "in" is simply "in", and "im" is a contraction of "in dem". However, in situations in which "der" (and "das") become "dem", "die" becomes "der" (dative case).
So you won't normally see "zu die", but rather "zu der". This also has a contracted form: "zur". If "in" is followed by the dative case, it would be "in die"; if followed by the dative case, "in der". No contraction is possible.
Also note that the use of contractions is less arbitrary than it is in English. In German, there are many occasions in which it is more or less "right" to use a contraction or to not use a contraction. It can also change the meaning of the sentence. This is something I learned after quite some time by getting a feel for the language, but I think it's at least good to keep in the back of your mind. You may notice this distinction in some exercises on Duolingo.