Thank you for using JustAnswer.
I'm sorry to hear about your situation. First of all, you need to understand what foreclosure means. It means that once the process is complete and the property is sold, the property is owned by someone else and they can evict you from the property. If you have somewhere else to go or have other arrangements, etc... then it certainly is a possibility.
The reason that you can "walk away" is that Social Security is exempt under the law from garnishment. The property itself can be recovered to repay the amount, but they can't go after your social security (or any retirement accounts, pensions, and other exempt assets). As such, if you were to walk away, the only real recourse they'd have would be against the house. They couldn't get anything else from you. Now of course this is ultimately your decision, but you'll know that they can't go after your Social Security income if you were to do it.
Hope that clears things up a bit. If you have any other questions, please let me know. If not, and you have not yet, please rate my answer AND press the "submit" button, if applicable.
Please note that I don't get any credit for the time and effort that I spent on this answer unless and until you rate it positively (3 or more stars). Look for the stars on your screen (★★★★★). You may need to scroll left/right/up/down to see these stars, but note that the rating is what closes out this question, so it is necessary that you do so.
Thank you, ***** ***** luck to you!