In a mortgage, the mortgagor, a person or entity with ownership rights in real property (usually, but not always the debor on the underlying obligation), grants a lien on the real property to the mortgagee, the person or entity to whom the debt is owed. Once the debt is paid, the mortgagee records a document (e.g. certificate of discharge) indicating that the lien is discharged.
In a deed of trust, the trustor is the person or entity with ownership rights in real property (usually, but not always the debtor on the underlying obligation). The trustor grants a lien to a trustee (often a title company). The trustee holds the lien in trust for a beneficiary, the person or entity to whom the debt is owed. Once the debt is paid, the trustee reconveys the deed of trust to the trustor.