If you've defaulted on a loan and the loan was sent to a collection agency to try and collect it from you then the loan debt will remain on your credit report 7 years.
The creditor or debt collector has up to 7 years to legally chase you for a debt and sue you in court for the debt.
After the 7 years the debt collector or original creditor can no longer legally force you to pay the debt back since the statute of limitations would've run out by then.