Generally Muslims won't keep dogs as pets but those Muslims who won't keep dogs as pets will keep them as working dogs, such as hunting dogs.
Other than that, Muslims are allowed to keep animals as pets provided they are not extravagant pets and that they are treated kindly.
I often see Muslim families at both the local zoo and the local nature centre which has petting animals such as rabbits, sheep, cows, ponies, donkeys, goats and pigs.