@Boyd McClean I'll defer to those who know more than me (and that would be many many people on these boards) but my understanding is:
(i) Chapter 7: the borrower is discharged but the lien stays attached to house (lots of rules about not calling the borrower, as they are personally discharged, so your only real exist it to start a FC - though some disagree on this point/are willing to risk it); and
(ii) Chapter 13: the underwater lien is put through the plan, if it has no equity, it can be stripped from the house and 2nd debt is treated as being unsecured. It then goes into the pool with the other unsecured debt, so likely that you receive very little. In a chapter 13, the borrower must complete the plan for it to have effect, so a stripped loan can be reapplied in the event that the plan does not complete.
Any of @Dion DePaoli , @Bob Malecki , @Bill G. , or ,@Mike Hartzog, will be a great resources to correct me if I'm pointing you wrong, but that is my very simplified understanding in a nut shell.