The Muslims do not have swine but they do have cats and dogs. Something to do with not touching haram animals. I know that Jews also consider pigs unclean, as well as cats and dogs. Is this uncleanness only about eating them or does it apply to owning them as well? Can they keep cats, dogs, swine?
Very generally and speaking just from personal experience (so this isn't a halachic source), pet ownership even in Orthodox families is very widespread. This includes dogs (domestic, not wolves obviously), cats (domestic, not dangerous cats), parrots, rabbits, mice, and hamsters. None of these are Kosher. Even our Orthodox Rabbi owned parakeets (not Kosher). So right off the bat, I can tell you that the conventional understanding is that being not kosher does not preclude owning the animal as a pet. There may be exceptions, but this is the general practice.
A relevant Gemara at Bava Kama 80a/b goes into the permissibility of owning animals (there is some back and forth permitting and forbidding, and there is an implication that it's dependent on whether they're useful for keeping pests away) as well as some back-and-forth discussion about whether one may own a cat (seemingly depending on if it's the type that may injure children). I however am not in a position to make a judgement about what the Gemara's final conclusion and implications are.
This article by Rabbi Yehuda Shurpin (he brings original sources there) explicitly says that one may own non-Kosher animals as pets (he mentions a horse), but one may not make a business out of owning non-Kosher animals if they are normally consumed for food. However, in the case of swine, one may not own them at all (there are various instances in Tanach and the Talmud where swine are singled out in unfavorable ways, see the article for details of the ruling and sources). Also Bava Kama 79b explicitly states one may not raise pigs anywhere.
Another exception is the case of an "evil dog." This article by Rabbi Howard Jachter goes into detail with sources defining what is an "evil dog" and the prohibitions and conditions surrounding owning one. In fact there are many varying opinions on whether one may own any dog at all, but it appears that the majority of modern poskim permit (outright or with reservation) owning dogs that don't bite or cause damage.
As a side note, as explained with sources in this other answer, simply touching non-Kosher animals doesn't impart impurity. It has to be dead (and then there may be differences depending on the kind of animal, but that is another issue).
One may not raise pigs anywhere. (Shulchan Aruch CM 409:2)
One may not raise vicious dogs unless they are always enchained. If one lives in a border town (where he fears the nearby enemy) he may release the dogs at nights. (:3)