We use the accusative case when the noun is the object of a sentence.
Which noun is the subject doing something to? The fox is attacking the sparrow, not the pond or the garden or itself. The word for sparrow will therefore be in the accusative case:
vulpes passerem petit – A fox attacks a sparrow
The noun cases tell us the function of both nouns. So the word order can change, and we will still understand that the wolf is the attacker and the sparrow the victim:
passerem petit vulpes – A fox attacks a sparrow
petit vulpes passerem – A fox attacks a sparrow
petit passerem vulpes – A fox attacks a sparrow