Praise be to Allah.
It is permissible in Islam for a person to keep permissible things that no one else has taken possession of before him, such as taking firewood from the desert or wood from the forest. The same applies to taking cats and raising them. One takes possession of a permissible thing by be acquiring it and having it under one's care, provided that it does not belong to anyone.
Based on the above, we may say that there is nothing wrong with keeping cats which do not belong to anyone, on condition that one feeds them and does not torment them. But if it is proven that they cause some harm, such as if they are ill or one fears that they may transmit disease, then you should not keep them, because “there should be no harming nor reciprocating harm.” So whoever will be harmed by a cat’s presence should not keep one. Similarly, one who is not able to feed a cat should let it eat from the vermin of the earth and not keep it locked up, because of the report narrated by al-Bukhaari (3223) and Muslim (1507) from ‘Abd-Allaah ibn ‘Umar (may Allaah be pleased with them both), according to which the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “A woman was punished because of a cat which she kept locked up until it died, and she entered Hell because of it, because she did not feed it or give it water when she kept it locked up, neither did she let it eat from the vermin of the earth.” For more information see question no. 3004.
With regard to cats eating food or drinking water, that does not make the food or water naajis (impure), because of the report narrated in Sunan Abi Dawood and elsewhere, which says that a woman brought some hareesah (a kind of food) to ‘Aa’ishah (may Allaah be pleased with her) and found her praying. (‘Aa’ishah) gestured to her that she should put it down. Then a cat came and ate some of it. When ‘Aa’ishah had finished praying, she ate from where the cat had eaten and said, “The Messenger of Allaah (peace and blessings of Allaah be upon him) said: ‘They (cats) are not naajis (impure), rather they are among those who go around among you (al-tawwaafeena ‘alaykum).’ I saw the Messenger of Allaah (peace and blessings of Allaah be upon him) doing wudoo’ with water from which a cat had drunk.”
According to another report narrated by Abu Dawood (68) from Kabshah bint Ka’b ibn Maalik, who was married to Ibn Abi Qutaadah, Abu Qutaadah entered and she poured some water for him to do wudoo’. A cat came and drank from the water, and he tipped the vessel for it so that it could drink. Kabshah said: “He saw me looking at him and he said, ‘Do you find it strange, O daughter of my brother?’ I said, ‘Yes.’ He said, ‘The Messenger of Allaah (peace and blessings of Allaah be upon him) said, “They (cats) are not naajis (impure), rather they are among those who go around among you (al-tawwaafeena ‘alaykum).”’” These two reports were classed as saheeh by al-Bukhaari, al-Daaraqutni and others, as was stated in al-Talkhees by Ibn Hajar, 1/15.
“Those who go around among you (al-tawwaafeena ‘alaykum)” means that they are like servants who are with people in their houses, i.e., cats are always with people, in their houses and among their vessels and furnishings, etc., and this is something that cannot be helped.
So if a cat drinks from a vessel or eats some of the food, it does not become naajis (impure). The owner has the choice. If he is not put off or if he needs it, he may eat (the food) or drink (the water), because it is taahir (pure), unless it is obvious that it will cause harm. If he is put off by the idea of eating or drinking, then he may leave it.
But we should point out here that what some people do, paying a great deal of attention to their cats and beautifying them, spending large amounts of money on them, is indicative of a lack of common sense and religious commitment, and exaggeration with regard to leisure, when there are millions of needy Muslims all over the world, let alone the fact that we Muslims should pay attention to making the best use of our time and filling it with worthwhile and beneficial pursuits, far removed from this folly which has come to us from the kaafir west where some people spend more on their cats and dogs than they spend on their own sons and daughters, let alone the poor and needy. They may even bring their pets to stay in fancy hotels and bequeath large amounts of money to them. Praise be to Allaah Who has honoured us with Islam and distinguished us from all the other nations.
We should also point out that selling cats is not allowed, as was narrated in Saheeh Muslim (2933) from Abu’l-Zubayr who said: “I asked Jaabir about the price of a dog or a cat. He said, ‘The Prophet (peace and blessings of Allaah be upon him) forbade that.’” For more information see question no. 7004 and 10207.
And Allaah knows best.