This means that he has become a kafir by doing what he has done. It is like when a person is in the state of wudhu and then he nullifies his wudhu through urinating or passing wind.
All the good deeds will be vanished as Allah tells us in the Quran unless he repents and returns to Islam