In the eighth chapter of Acts in the New Testament, we are told of the conversion of a magician to Christianity by the Apostles.
That is, the magician professed to be converted, but it soon turned out that he was not. He had himself been skilled, and was able to perform marvelous tricks.
Hence, when he saw the miraculous cures effected by Peter and Philip simply through the laying on of hands, he thought it to be a new kind of sorcery, one that he could use to advantage.
So he sought out the Apostles and offered them money to teach him these tricks. “But Peter said unto him, Thy money perish with thee, because thou hast thought that the gift of God may be purchased with money.”
The name of this sorcerer was Simon, sometimes referred to as “Simon Magus,” that is, “Simon the magician.”
From his name and the sin that he committed, the purchase or sale of ecclesiastical position is now described by the word simony.