A debtor is person or group of person who has to pay or return benefits or sum of amount to another person or group of persons.
A debtor can be a person, government, agency, or any institution that borrows goods/services or amount from another entity (Creditor).
In above diagram “X” has to pay a sum of amount to “Y”. Therefore” X” is the debtor of “Y” and “Y” is beneficiary.