Religion plays in the Crusader Kings II a big role. Crusades, jihads, excommunication, investiture, Church's schisms: those only few issues that you should look upon and which are connected strictly with the religious life in his country. Issues concerning religion are present at every stage of the game and not only by the points but also by various interactions, especially with the pope.
There are four big religions: catholicism, orthodox, shiism and sunni. Every of this cult has its own religion leader who decides about holy wars, divorces and many other things. Besides those religion, there are also smaller ones, pagan: but they don't matter much.
You can play only as a Christian ruler, so catholic or orthodox one. When you're believe of one of those, you can freely declare wars at infidels. It doesn't break the law among "equal" monarchs. In practice it means that catholic can attack every muslim and pagan, but to fight with the orthodox he needs a casus belli.
Relations with the heads of the Church have crucial role in the religious development of the country and character. Those persons decide about excommunication, crusades and divorces, so it's worth to keep them satisfied. Below you can find list of all interactions you can make:
* Request Invasion - sometimes you want to attack fellow believer, but you don't have a proper casus belli. In such case you can ask pope or patriarch for a dispensation. If you're a catholic leader with at least 250 piety points (500 for an emperor) without any wars at the moment, you may ask the Head of the Church for blessing invasion on other, Christian country. Victory in such war allow you to get all domain of the defeated enemy with two reservations: defender has to have more lands than an attacker and the whole action depends on the pope's will.
* excommunication - another way to take over the power in someone's country is ask the religion authority for excommunicate an enemy. If the relations between the victim and the cult's leader aren't good, you have big chances for getting it. In such case, after excommunication, you can harm enemy as you like, because he stops being a member of the Church. Every other Christian will be also able to fight with him. And if you're excommunicated you can ask pope or patriarch for cancelling it, what usually requires shiny yellow arguments. An alternative is setting up your own cult, as it's described in the Religion: Antipope.
* divorce - if for some reasons you need to get rid of the wed, and you don;t want to assassinate him/her it's worth to ask pope or patriarch for a divorce. Religion leaders rarely accept such asks, and the act itself is expensive (100 piety points) and also it annoys family of the deserted one. That's why usually is better to kill a wed.
Of course all characters in the game can negotiate with the religion leaders according to the same rules: so watch out enemy's plots. The most comfortable way to secure yourself is to keep good relations with the pope or patriarch or set up your own cult. The second option is usually even better, because the antipope is more submissive, what save you from additional problems.