A Beracha (blessing) is recited when one sees a house of Avodah Zarah (idolatry) or, according to many people, an actual Avodah Zarah. A church would fit that criterion as Avodah Zarah according to the Rambam. The person says, with Hashem's name: “Baruch atah Hashem, Elokeinu melech ha'olam, shenatan erech apayim le'ovrei retzono” (Blessed are You, Hashem, our God, King of the universe, who gives patience to those who violate His will). Hashem gave patience to those who violate His will.
This is a perfect example of how the Chachamim (sages) are able to look at something negative in the world and turn it into a way to praise Hashem. Hashem's strength is that He leaves people who are committing idolatry and terrible acts of corruption, and He doesn't punish them right away. He gives them patience to be able to do teshuvah (repentance) and commands us to try to bring them over to the proper way of thinking. And so a Beracha is said when a person sees Avodah Zarah.
In truth, a person is not supposed to go searching or looking for Avodah Zarah or investigating it. The pasuk (verse) says, “Al tifnu el ha'elilim.” Do not turn your attention to gaze or to try to investigate or understand or be in awe or inspired by Avodah Zarah. A person should not go sightseeing for churches and other types of Avodah Zarah because a person is supposed to distance himself from these things as much as possible. But if a person happens to see it, then a Beracha is recited.
However, the Shulchan Aruch qualifies this by saying that if you see it within 30 days, then a Beracha is not recited because a person frequents it. For that reason, the Rema writes that today, especially for those living in chutz la'aretz (outside the Land of Israel), among the goyim (non-Jews), ein mevarachin zot haberacha. We don't make this Beracha at all because we see it all the time and it's around us all of the time, and therefore, such a Beracha would not be recited.
But it's kedai (worthwhile) to understand that the Beracha exists, how Hashem wants us to get the rest of the world to do teshuvah, and how we ourselves are to try to distance ourselves from these types of things.

