Both theology and the philosophy of religion have played important roles in Western culture, but not everyone understands the important differences between them. The motives behind theology and the philosophy of religion are very different, but the questions they ask and the topics they address are often the same.
The line between theology and the philosophy of religion and theology isn't always sharp because they share so much in common, but the primary difference is that theology tends to be apologetical in nature, committed to the defense of particular religious position, whereas Philosophy of Religion is committed to the investigation of religion itself rather than the truth of any particular religion.
Both the precedent and adoption of authority are what distinguish theology from philosophy generally and religious philosophy in particular. While theology relies upon religious scriptures (like the Bible or the Quran) as authoritative, those texts are simply objects of study in the philosophy of religion. Authorities in this latter field are reason, logic and research. Whatever the specific topic being discussed, the central aim of the philosophy of religion is to scrutinize religious claims for the purpose of formulating either a rational explanation or a rational response to them.
Christian theologians, for example, dont normally debate amongst themselves whether God exists or whether Jesus is the Son of God. To engage in Christian theology, it is assumed that one must be a Christian as well. We can contrast this with philosophy and observe that someone who writes about utilitarianism is not assumed to be a utilitarian.
Furthermore, theology tends to take on an authoritative nature within the religious tradition that it operates. The conclusions of theologians are taken to be authoritative over believers if the dominant theologians agree on some particular conclusion about the nature of God, it is an error for the average believer to adopt a different opinion. You wont typically find the same attitudes within philosophy. Certain philosophers may have an authoritative status, but so long as a person has good arguments it isnt an error (much less heresy) for anyone to adopt a differing opinion.
None of this means that the philosophy of religion is hostile to religion and religious devotion, but it does mean that it will criticize religion where warranted. We should also not assume that theology doesnt employ reason and logic; however, their authority is shared or even at times subsumed by the authority of religious traditions or figures. Because of the many potential conflicts between the two, philosophy and theology have long had a shaky relationship. At times some have regarded them as complimentary but others have treated them as mortal enemies.
Sometimes theologians assert for their field the status of a science. They base this claim first on the premise that they study foundational events of their religion, which they take to be historical facts, and second on their use of the critical methods of fields like sociology, psychology, historiography, philology, and more in their work. So long as they adhere to these premises, they may have a point, but others can fairly challenge the first premise.
The existence of God, the resurrection of Jesus Christ, and the revelations to Muhammad may be accepted as facts with specific religious traditions, but they need not be accepted as true by those outside the field not like the existence of atoms must be accepted by those who arent involved in physics. The fact that theology depends so heavily upon prior commitments to faith makes it very difficult to categorize it as a science, even with soft sciences like psychology, and it also why apologetics plays such large role in it.
Apologetics is a branch of theology that is focused specifically upon defending the truth of a particular theology and religion against outside challenges. In the past, when basic religious truths were more widely accepted, this was a minor branch of theology. Todays atmosphere of greater religious pluralism, however, has forced apologetics to play an ever greater role, defending religious dogmas against the challenges of other religions, schismatic movements, and secular critics.