"The dog is playing with a cat."
Translation:Der Hund spielt mit einer Katze.
It depends on the case and the gender of the noun. In this sentence, the case is dative due to "mit" and the gender is feminine as "Katze" is feminine. Here is a link, I suggest you bookmark it.... http://en.wikipedia.org/wiki/German_declension
The part you are looking for there is "indefinite articles". Hope that helps.