Removing impurity is done by washing with water. If one comes to know while in the prayer, that he is impure if he’s able to remove it, he should remove it, if he’s not able to remove it, he should stop the prayer. This is founds in the Hadith in Sunan Abu Dawud. When Prophet’s (ﷺ) footwear had some impurity and Jibrīl came to tell him and he removed it.
If one remembers that he’d no Wudhu after reading the Salah, he has to repeat it. The proof is the hadith (Indeed Allah will not accept the prayer from anyone of you if he spoils his purity until he purifies himself)
[Taken from the lessons on “Conditions, Pillars and Obligation of Salah – Shaykh ul Islaam Muhammad bin Abdil Wahhab رحمه الله Explanation by Shaykh Abdul Muhsin al abbaad حفظه الله Taught by: Abdulilah Lahmami]