The key difference between indicator electrode and reference electrode is that indicator electrode responds to changes in the activity of the analyte, whereas reference electrode does not respond to changes, and its response is stable.
Electrons are transferred from atoms of sodium to atoms of phosophorus. This transfer makes the sodium atoms positive and the phosphorus atoms negative. As a result, the sodium and phosphorus atoms strongly attract each other.