If your house has been foreclosed on and the house sells at a foreclosure auction and your home sells for as much as you owe to the bank on the mortgage then you won't owe the bank anymore money on the mortgage.
However if the home sells for less than what you owe on the mortgage through the foreclosure auction then you'll still owe at least the remaining amount on the foreclosed home.
You can usually stop the foreclosure by paying back the missed payments in full and any other fees such as the foreclosure fee before the house actually sells at an auction but if not then the bank will foreclose and you'll have to move out of the home.