An agitated person runs screaming into a church yelling “Sanctuary!” at the top of their lungs. They are evading the law for either unjust or just reasons, and for a long time, the ability to claim this safe harbor was recognized by most countries. Of course as soon as a person left a church, safe harboring ended, and all bets were off.
Today, there are a few churches that may offer protection from certain laws on a limited basis. This largely depends on the church, the country, and a variety of other factors. In most cases, a priest, minister or bishop has to give sanctuary to the seeker and it can be denied.
In England, King James I specifically made seeking sanctuary illegal, but given his status as head of church, Anglican, and state, he was well in his rights to do so. It’s a little unclear in countries where separation of church and state are valued. For instance, in recent times, some conscientious objectors, like soldiers who didn’t want to got to war in Iraq and illegal immigrants who face deportation have sought help or harboring form churches and been given it. The First United Method Church in Tacoma, Washington gave refuge to such an officer, and made a blanket offer to others in the military service who conscientiously objected to the war in Iraq, but it was given on a limited basis only for a few nights.
It is not necessarily legal to offer sanctuary and in actuality is in specific defiance of the law in the US. There have been recent changes to this law that allow for ministers who offer sanctuary to not be prosecuted. Sometimes, in spite of the law, a person in violation of the law is given a brief refuge in a church and is not apprehended. This largely depends on the type of crime committed. A violent felon, should he or she be granted safe harbor in a church, is likely to be arrested in a church because of the danger posed to the community.
While seeking a safe place in a church is often associated with Catholicism, Roman Catholics, since 1983, do not necessarily offer it and may not defend it. Also, in many churches of many denominations it may be hard to find an open church since many are locked when they aren't in use in order to prevent vandalism and theft. Further, the Catholics didn’t invent sanctuary, as many might think due to Victor Hugo’s The Hunchback of Notre Dame.
Much older religions also may have offered brief stays to people in temples or places of worship. It’s an older idea than Christianity, but as with modern times, it may not always be honored. Most often today, you’ll find the idea of sanctuary as offered to people who are in danger of being deported.
This was the case with Elvira Arellano, who sought sanctuary with a Methodist Church in the US in 2006. She was deported in July of 2007, leaving behind her seven year old son who, having been born in the US, is a US citizen. There are unfortunately many cases where immigration laws in the US have led to situations of parents being deported while children remain behind, and this is why some churches have taken a hard line on offering a temporary place to stay to parents. As soon as they leave the church, though, any religious laws a state might respect, even if they are informal, are void, and people may be quickly arrested.