What is the difference between contract of indemnity and guarantee?

A contract of guaranty is a collateral undertaking, and presupposes an original contract; while a contract of indemnity is original and independent.
In a contract of indemnity, the undertaking is to make good and save harmless the person, with whom the contract is made, upon an obligation of such person to a third person;
while, in a contract of guaranty, the obligation is to answer for the debt, default, or miscarriage of another to the person with whom the contract is made.