A liability is a debt or obligation owed to a third party or institution. From an accounting point of view, liabilities are all debts that accumulate.
When talking about good debt and bad debt, good debt refers to debt that is used to acquire assets, i.e. items that will increase in value or help generate income, such as a rental property. Bad debt is used to acquire a liability, which is usually a consumption-related item.