If the student loan was a Federal Student loan then yes after the borrower of the student loan dies then the debt is automatically canceled and is no longer owed.
It would make sense because either way you can't pay a debt off or pay a debt back after you're dead.
Private student loans however don't automatically get canceled and if the loan had a cosigner on it and the cosigner is still alive then they become responsible for the student loan debt.
You can enroll in a student loan repayment program and as long as you make payments to the student loan then after 25 years you can have the student loan forgiven.