If you are religious, then God created them. If not, the answer is pretty much unknown, although animals as we see them today are decended from others, so they were created through evolution.
the most logical answer would be that they were created to help keep our planet ecosystem in balance, without animals, earth would eventually become ininhabitable.