Ransom is the practice of holding a prisoner or item to extort money or property to secure their release, or the sum of money involved in such a practice.
When ransom means "payment", the word comes via Old French rançon from Latin redemptio, 'buying back'; compare "redemption".