If the 1st forecloses, the second is magically and completely wiped off, assuming the amount bid is equal or less to the amount the 1st is owed. The Second has the right to protect their position – they can bring the 1st current and foreclose on the property themselves. If the second forecloses, they are still responsible for the 1st.