Look at it Chapter 13 is a way to save your home from foreclosure, and can indeed stop foreclosure so long as you continue to make the payments agreed to under the plan until all debt owed is totally paid off.
A loan modification occurs when a lender agrees to change one or more parts of the loan terms in order to make the loan more affordable to the borrower (while still being able to repay the lender).