No a debt is never discharged by law. It can be effectively "discharged" by the creditor when the creditor decides to not pursue it. There is no time limit though the creditor must reaffirm interest in collecting the debt at least every 6 years
To clarify - the debt exists until it is paid, or written off by the creditor. But if there has been no contact or acknowledgement of the debt for 6 years (or 12 years for secured debts) then the creditor cannot take legal action to recover the debt unless they obtained a CCJ before the 6 years was up.