As an integral part of balance sheet, based on classification, all debt is classified as liabilities, but not all liabilities are debt, for example, accrued future warranty costs is not a debt, but rather an estimate of a future liability.
Liability is when you borrowed money or any amount owed to another. This may includes regular long term or short term bills, for instance amount due for electricity bill that has been received, but not yet paid.
Debts are specific type of liability that includes borrowed money such as a loan, mortgage. Debt arises when a company lends money from another party in order to raise funds and it is to be paid back at some future date. On the other hand, liability arises when financial obligations are required for a business to function or for business processes to work.