Praise be to Allah.
The substance that is put in cheese is rennet; it is a yellowish white substance in a vessel of skin which is extracted from the stomach of a calf or nursing lamb. A little of it is added to the milk, which curdles and becomes cheese.
See al-Mawsoo’ah al-Fiqhiyyah (5/155).
The ruling on rennet varies according to where it is taken from. If it is taken from an animal that has been slaughtered in accordance with sharee’ah, then it is pure and may be eaten. If it is taken from an animal that died of natural causes or an animal that was not slaughtered in accordance with sharee’ah, then there is a difference of opinion among the fuqaha’ concerning it. The majority of Maalikis, Shaafa’is and Hanbalis are of the view that it is najis. Abu Haneefah and Ahmad, according to the other report narrated from him, were of the view that it is taahir. This is the view favoured by Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him). He said in al-Fataawa (21/102): It is more likely that their cheese -- referring to the Magians -- is halaal and that the rennet from a dead animal (one that died of natural causes) and its milk are taahir. End quote.
He also said (35/154): With regard to cheese that is made with their rennet – i.e., from some of the baatini sects who are regarded as kaafirs – there are two well-known views concerning that among the scholars, as in the case of rennet from dead animals and rennet from animals slaughtered by the Magians and Franks, of whom it is said that they do not slaughter meat properly. The view of Abu Haneefah and of Ahmad according to one of the two reports narrated from him is that this cheese is permissible, because the rennet of dead animals is taahir according to this view, because then it does not die when the animal dies. The view of Maalik and al-Shaafa’i, and of Ahmad according to the other report, is that this cheese is najis because in their view the rennet is najis, because the milk and rennet of the dead animal are najis according to them. If meat slaughtered by a particular person cannot be eaten, then meat slaughtered by him is like dead meat. Those who hold both views quoted as evidence reports that were narrated from the Sahaabah. Those who hold the first view narrate that the Sahaabah ate the cheese of the Magians, and those who hold the second view narrate that they ate what they thought was cheese of the Christians. This issue is subject to ijtihaad and one may follow the view of the Shaykh he asks. End quote.
This is the correct opinion. Whether you know the source of the rennet and that it comes from an animal that was slaughtered properly or otherwise, or you do not know, there is nothing wrong with eating cheese that has been made with it.
And Allah knows best.