You know there are 100 legs in total, so start from there. Try plugging in different combinations of numbers and see what you end up with.
Say there are 15 cows and 15 chickens. That's 15 times four legs for the cows and 15 times two legs for the chickens. That gives you 30 animals and 90 legs. Close, but not quite 100. Now give it a try yourself and see if you can figure out the answer!