Federal student loans will be discharged in the case of death as long as they are in good standing with the Dept. of Education (i.e. the borrower must be up to date on required payments).
Parent PLUS loans may be discharged if the parent or the student who the loan was taken out on behalf of dies.
In some cases, the loan servicer may require proof of death before the loans can be discharged. It is best to reach out to the borrower's loan servicer to confirm what is needed. Acceptable documentation usually includes an original death certificate, a certified copy of the death certificate, or an accurate and complete photocopy of one of those documents.
There is currently no administrative discharge for private student loans. You must contact the lender or loan holder to determine their policy for death.
You can read more about federal death discharge here: https://studentaid.gov/manage-loans/forgiveness-cancellation/death