Animals are Mukse. Therefore, it is prohibited to pick up a pet, such as a dog or a cat on Shabbat. The Poskim discuss whether it is permitted to pet the hair of an animal, without moving its body. The Be’ur Halacha (Rav Yisrael Meir Kagan of Radin, 1839-1933, 312:11) does not reach a firm conclusion, but he leans towards the position that the hair is different from the body of the animal, even though it is attached. Accordingly, it should be permitted to wipe one's hands on the tail of a horse. Apparently, this distinction between the hair and the body is based on the fact that the whole reason the animal is Mukse is because it is prohibited from use on Shabbat. The prohibition of using an animal only applies to its body, and therefore the Mukse does as well. Just as there was no Gezerah-enactment prohibiting use of the hair, there was also no classification as Mukse. Nevertheless, practically it is difficult to separate between petting the hair and contact with the animal's body.
Hacham Yishak Beracha in his book on Mukse (p.86) brings both sides of the argument, but concludes that it is preferable to be strict and not pet animals.
Animals are Mukse, and it is best to refrain from petting them.