The meaning of a ransom is clearly set forth in Lev. 25:47-49: To
deliver a thing or person by paying a price; to buy back a person
or thing by paying the price for which it is held in captivity. So
sin is like a slave market in which sinners are "sold under sin"
(Rom. 7:14); souls are under sentence of death (Ezek. 18:4). Christ,
by His death, buys sinners out of the market, thereby indicating
complete deliverance from the service of sin. He looses the bonds,
sets the prisoners free, by paying a price--that price being His
own precious blood.
To whom this ransom is paid is a debatable question: whether to
Satan for his captives, or to eternal and necessary holiness, to
the divine law, to the claims of God who is by His nature the holy
Lawgiver. The latter, referring to God and His holiness, is probably
preferable.
Christ redeemed us from the curse of a broken law by Himself being
made a curse for us. His death was the ransom price paid for our
deliverance.