1. To pledge or convey (property) by means of a mortgage.
2. To make subject to a claim or risk; pledge against a doubtful outcome: mortgaged their political careers by taking an unpopular stand.
Typically, when you buy a house or a piece of property, you have and put up part of the money to pay for it and then you borrow the rest. To get the loan you need for the rest of the money, you mortgage (in the transitive verb #1 sense, above) the property to the lending company as a security guarantee for the loan.
You make an agreement with the lender (in the sense of noun #1 version, above) which is written up and signed as a contract between the borrower (you) and the lender (the person or entity that puts up the mortgage money.
This contract gets registered in the public registry where the records of property titles are kept, in order to notify anyone who checks the property that this obligation exists (in the sense of noun versions #'s 2. and 3. above). When we speak of "the mortgage" it is generally in this sense, with this meaning.
In essense a mortgage is a contract made between borrower and lender. In a mortgage contract the borrower pledges the title to a piece of borrower's real estate, frequently a property with a house on it, as a guarantee for the mortgage. This is done in a formal legal document that is registered in the public records alongside the title to the property pledged.
If the contract proceeds as expected, the borrower makes payments as agreed, with interest as agreed until the obligation is completely paid off. Then the borrower asks to lender to cancel the mortgage registered against the property since the borrower's obligation to the lender has been fulfilled. Once the mortgage is finally cancelled by the lender, the borrower then owns his property free and clear of any mortgage claim by the lender.
If, however, the borrower defaults on the mortgage agreement by not making the payments as agreed, the lender can foreclose on the property and have it sold to satisfy the loan obligation . See:What exactly is foreclosure?