Did the religion ignore it, assimilate it into the pantheon (like Islam and Djinn), attempt to exterminate it, tolerate it? Was magic assumed to stem from the religion's cosmology or did it come from outside of it? Did the magic supplement areas where the religion didn't have power, or did it exist for another reason?
Edit: didn't realize headline flair got added automatically, sorry for the redundant title.
Most people have some basic familiarity with the practice of Vodou in Haiti, a religious practice with very obvious West African influences that emerged from slave communities. Less well known is Obeah, a similar group of practices that emerged in the British Caribbean and in particular Jamaica (where it is also called Myal). Obeah is a collection of religious beliefs and practices of similar origin to Voudou, noted for the belief in supernatural spirits that can aid Humans, divination, ancestor reverence, herbal medicine and sometimes faith healing. In Jamaica in particular, the Myal variant was associated with all manner of vibrant spiritual practices. Usually, Obeah appears to focus on the unique gifts of specific individuals - Obeahmen or -women - to interact with the spiritual world as intermediaries on behalf of ordinary people; such individuals are also often looked to for general life or spiritual guidance. This is a diverse system of beliefs united by common themes rather than scripture or philosophy; depending on who you go and who you ask, Obeah has quite different meanings and implications.
These beliefs and practices have very obvious West African inspiration and origins, and have been understood by scholars as one of the remarkable ways in which African slaves and their descendants tried to resist the destruction of their identity and culture in the Caribbean. It is unclear to what extent these slave spiritualities existed in harmony or conflict with slave Christianity; certainly in slave Christian practice in general, there is often evidence of West African inspiration in how Christian practice evolved. It has always been debated to what extent slaves authentically embraced Christianity (at least initially) and to what extent it was a cover for the legitimisation of their own belief systems; the existence of systems like Obeah and Myal complicate that further. Certainly in Jamaica, by the mid 19th Century these practices were intermingling heavily with Baptist Christianity. Indeed, some Jamaicans at least saw a divide between Obeah and Myal - Myal was the 'good practice', compatible Christianity, and Obeah the 'bad one', even though they are both part of a profoundly common spiritual heritage.
Invariably, white Christians in the British Caribbean understood these belief systems in terms of witchcraft and magic. Contemporary white elite British culture at the time had largely moved on - at least on paper - from concerns about such things; belief in witchcraft as a physical reality was largely seen as unsophisticated at the time. Instead, white Christians in the Caribbean generally came to understand Obeah in terms of a pretence to magical power and abilities, specifically harmful, malicious power and abilities. These practices were for all intents and purposes a kind of black magic. The white elite tried to encourage and promote this attitude among their slaves and the free black population as well.
From the mid-18th Century onwards, the colonial authorities and planters set out to legally repress these belief systems. As of this year, Obeah has been illegal in Jamaica for 255 years - in a country that has only been fully independent for 53 years! At one point, it was illegal in the entirety of the British Caribbean; in the eighteenth century it typically carried the death penalty, and until recently you could still be flogged for Obeah in Jamaica, though prosecutions in the modern era are rare. There was nonetheless a time when offences against Obeah legislation - after the moderation of the law - became so common that they were dealt with by common magistrates rather than courts of law proper.
What is fascinating in particular though is how the repression of Obeah has been constructed. Today in Jamaica, the justification is that is it a fraudulent practice; that Obeah practitioners seek to deceive vulnerable people out of money, or to exploit them for other personal gain. Implicit in this mode of understanding is a belief that this is a wholly illegitimate practice only a fool could believe in, and that Obeahwo/men consciously deceive superstitious customers rather than provide authentic spiritual leadership or services. The construction of this law has its obvious roots in how white Christian elites interpreted Obeah as a pretence to having magical powers; an attempt by particular enslaved individuals to elevate themselves to a higher station and deceive others into thinking they were worthy of following or turning to for extraordinary help - or worse, to inflict harm on others. For centuries the legal and elite cultural construction of Obeah has been that it is a dangerous folk superstition based on deception and fantasy, not a legitimate religious practice. The response of the Christian establishment was to thoroughly de-legitimise Obeah and similar practices, through law, through rhetoric, through Christianisation and through violent repression.
This is all the more remarkable when one considers that Jamaica has a very rich history of diverse religious and spiritual beliefs considered heretical, unusual or just downright bizarre in mainstream Christianity, including apocalyptic movements that had some rather unorthodox beliefs (like one particularly unique African Caribbean religious movement that supposedly tried to teach people how to fly by throwing them out of trees and promised that, at the end of days, all black people would be made white, so they would be pleasing to God in Heaven!).
It is telling that to this day the anti-Obeah laws, though much milder, still stand in many parts of the Caribbean - and that many African Caribbean people have come to share the perception of Obeah as wicked and wrong, especially in profoundly Christian Jamaica. Yet it still persists particularly in the rural Caribbean and there are parts of the region where it is not only quite easy still to find an Obeahman but to seek out pharmacists who will happily sell you Obeah paraphernalia, even though possession of such material is usually enough for conviction (and for this reason said pharmacists are usually very reluctant to acknowledge why they sell it). This recent BBC article discusses the modern phenomenon in Jamaica.
For an overview of the history of Obeah as it has been understood through the narratives of Christianity and the elite in Jamaican history in particular, see Diana Paton, "Obeah Acts: Producing and Policing the Boundaries of Religion in the Caribbean" in Small Axe 13, no. 1 (2009), 1 - 18.