Sacrilege
Sacrilege is the violation or injurious treatment of a sacred object, site or person. This can take the form of irreverence to sacred persons, places, and things. When the sacrilegious offence is verbal, it is called blasphemy, and when physical, it is often called desecration.  In a less proper sense, any transgression against what is seen as the virtue of religion would be a sacrilege, and so is coming near a sacred site without permission.
Most ancient religions have a concept analogous to sacrilege, often considered as a type of taboo. The basic idea is that realm of sacrum or haram stands above the world of the profane and its instantiations, see the Sacred–profane dichotomy.

Etymology
The term "sacrilege" originates from the Latin sacer, meaning sacred, and legere, meaning to steal. In Roman times, it referred to the plundering of temples and graves. By the time of Cicero, sacrilege had adopted a more expansive meaning, including verbal offences against religion and the undignified treatment of sacred objects.
Owing to the phonetic similarities between the words sacrilegious and religious, and their spiritually-based uses in modern English, many people mistakenly assume that the two words are etymologically linked, or that one is an antonym of the other. Religious is derived from the Latin word religio, meaning "reverence, religion", (from religare, "to bind [to the god{s}]"; Tully derived it from re- [again] and legere [to read]), whereas sacrilegious is derived ultimately from the Latin combining form sacr-, meaning sacred, and the verb legere, meaning "to steal", "to collect", or "to read". The Latin noun sacrilegus thus means "one who steals sacred things".1

Christianity
With the advent of Christianity as the official religion of the Roman Empire, the Emperor Theodosius criminalized sacrilege in an even more expansive sense, including heresy, schism, and offenses against the emperor, such as tax evasion.
By the Middle Ages, the concept of sacrilege was again restricted to physical acts against sacred objects, and this forms the basis of all subsequent Catholic teachings on the subject. A major offence was to tamper with a consecrated host, otherwise known as the Body of Christ. Additionally, Bible desecration has resulted in prosecution.Most modern nations have abandoned laws against sacrilege out of respect for freedom of expression, except in cases where there is an injury to persons or property.  In the United States, the U.S. Supreme Court case Burstyn v. Wilson (1952) struck down a statute against sacrilege, ruling that the term could not be narrowly defined in a way that would safeguard against the establishment of one church over another and that such statutes infringed upon the free exercise of religion and freedom of expression.
Despite their decriminalisation, sacrilegious acts are still sometimes regarded with strong disapproval by the public, even by nominal or former members and non-adherents of the offended religion, especially when these acts are perceived as manifestations of hatred toward a particular sect or creed.

Catholic Church
According to Catholic theology sacrilege is classified as personal, local, or real.
Personal sacrilege is irreverence shown to a person consecrated by religious vows (monks, nuns, etc.) or by holy orders (deacons, priests, bishops). Ridiculing, mocking, or abusing members of the clergy is considered personal sacrilege, as often the animosity is directed not at the person themselves but at the Church or at God whom they represent. Whenever those in religious or clerical life violate the sixth Commandment and break their vow of chastity, it is considered a personal sacrilege on their part. Laying violent hands on a cleric used to incur an automatic excommunication according to the 1917 Code of Canon Law. Since 1983, only someone who physically attacks the pope is excommunicated.
Local sacrilege is the violation and desecration of sacred places and space. Robbing or vandalizing a church, chapel, oratory, convent, or monastery would be of this category. It could also be committing immoral and sinful acts inside a sacred building, such as murder or sexual acts. The 1917 Code considered the burial of a publicly excommunicated person in a Catholic cemetery or hallowed ground to be sacrilege. The current 1983 Code makes no mention of it.
Real sacrilege is the contemptuous irreverence shown for sacred things, especially the Seven Sacraments or anything used for divine worship (altars, vestments, chalices, tabernacles, et al.). This can happen first of all by the administration or reception of the sacraments in the state of mortal sin, as such as receiving Communion, as also by advertently doing any of those things invalidly. Using sacred vessels for secular use, such as a chalice to drink cocktails, or using common items like paper plates and Styrofoam cups for liturgical worship, are also examples of real sacrilege. The worst kind is desecration of the Blessed Sacrament, as it is the most important and most sacred item in Catholicism (far more than any relic or historical artifact whatsoever).

England and Wales
In Post-Reformation England, sacrilege was a criminal offence for centuries, though its statutory definition varied considerably. Most English dictionaries of the seventeenth and eighteenth centuries appealed to the primary sense of stealing objects from a church.
Criminal law was consolidated by Peel's Acts from 1828. Of these, 7 & 8 Geo 4 c 27 repealed the provisions of 1 Ed 6 c 12 in relation to sacrilege, while two created new laws around larceny: 7 & 8 Geo 4 c 29 for England and Wales, and 9 Geo 4 c 55 for Ireland. Section 10 of each was identical:

That if any person shall break and enter any church or chapel, and steal therein any chattel, or having stolen any chattel in any church or chapel, shall break out of the same, every such offender, being convicted thereof, shall suffer death as a felon.
Both of those sections were replaced by section 50 of the Larceny Act 1861, which was described by its marginal note as "breaking and entering a church or chapel and committing any felony" and which read:

Whosoever shall break and enter any church, chapel, meeting house, or other place of divine worship, and commit any felony therein, or being in any church, chapel, meeting house, or other place of divine worship, shall commit any felony therein and break out of the same, shall be guilty of felony, and being convicted thereof shall be liable, at the discretion of the court, to kept in penal servitude for life, or for any term not less than three years, or to be imprisoned for any term not exceeding two years, with or without hard labour, and with or without solitary confinement.
This offence was not triable at quarter sessionsSection 50 of the Larceny Act 1861 was repealed by section 48(1) of, and the schedule to, the Larceny Act 1916. It was replaced by section 24 of the Larceny Act 1916 which provided:

Every person who - 
(1) breaks and enters any place of divine worship and commits any felony therein; or
(2) breaks out of any place of divine worship, having committed any felony therein;
shall be guilty of felony called sacrilege and on conviction thereof liable to penal servitude for life.
The words "arrestable offence" were substituted for the word "felony", in subsections (1) and (2), by section 10(1) of, and paragraph 12(1) of Schedule 2 to, the Criminal Law Act 1967.
Section 24 was replaced by sections 9 and 10 of the Theft Act 1968 (which create the offences of burglary and aggravated burglary.

As violence, self-harm and pride
Violence against God was the sign of arrogance which brought attributes of a divine nature down to the material world, while their existence belonged to gods and thus was inviolable.

See also
Anti-Sacrilege Act
Bible desecration
Blasphemy
Church arson
Desecration
Host desecration
Sin

Notes
7. The Editors of Encyclopædia Britannica. (n.d.). Theodosian Code. Retrieved March 31, 2017, from https://www.britannica.com/topic/Theodosian-Code

External links

Sacrilege Catholic Encyclopedia
Webster's Dictionary of English Usage 1989
Magda Teter, Sinners on Trial: Jews and Sacrilege after the Reformation (Harvard University Press, 2011), ISBN 978-0-674-05297-0