In general, simony is the buying or selling of a spiritual office, act, or privilege. The term comes from Simon Magus, the magician who tried to buy the power to bestow miracles from the Apostles (Acts 8:18). It is not necessary for money to change hands in order for an act to be deemed simony; if any kind of compensation is offered, and if the motive for the deal is personal gain of some kind, then simony is the offense.
In the first few centuries C.E., there were virtually no instances of simony among Christians. The status of Christianity as an illegal and oppressed religion meant that there were few people interested enough in obtaining anything from Christians that they would go so far as to pay for it. But after Christianity became the official religion of the western Roman empire, that started to change. With imperial advancement often dependent on Church associations, the less pious and more mercenary sought Church offices for the attendant prestige and economic advantages, and they were willing to spend cash to get them.
Believing that simony could damage the soul, high church officials sought to stop it. The first legislation passed against it was at the Council of Chalcedon in 451, where purchasing or selling promotions to holy orders, including the episcopate, priesthood, and diaconate, were prohibited. The matter would be taken up at many future councils as, through the centuries, simony became more widespread. Eventually, trading in benefices, blessed oils or other consecrated objects, and paying for masses (aside from authorized offerings) was included in the offense of simony.
In the medieval Catholic Church, simony was considered one of the greatest crimes, and in the 9th and 10th century it was a particular problem. It was especially notable in those areas where church officials were appointed by secular leaders. In the 11th century, reform popes such as Gregory VII worked vigorously to stamp out the practice, and indeed, simony began to decline. By the 16th century, incidents of simony were few and far between.