An agreement, usually in writing, between a borrower and a lender that sets out the terms of the loan between two parties.