The percentage of the population that does not follow the state religion causes public order penalties. The population of every province is divided over the different religions present in the province. You can convert in the faction screen, under the summary tab.
To convert to a certain religion, at least 35% of the population has to follow that religion. In addition, you get a +10 attitude with every faction of the same religion and a -10 attitude with every faction of a different religion For the details, see the individual religion pages The state religion gives a unique factionwide bonus, and gives access to a religious building chain and religious edicts.