This quote comes when Ender is speaking to Valentine, his sister, about his experiences in Battle School. Ender has come to undersand himself better, and knows that he is capable of extraordinary brutality if it is necessary to protect himself or his friends. He explains to Valentine:
"In the moment when I truly understand my enemy, understand him well enough to defeat him, then in that very moment I also love him... and then... I destroy them. I make it impossible for them to ever hurt me again."
(Card, Ender's Game, Google Books)
Ender is terrified that he is becoming like his brother Peter, who is a sociopath, and that he is capable of killing without purpose. However, his words show that he understands the need for pragmatic violence when it prevents worse future violence; his words are reflected in his fights with Stilson and Bonzo, who he accidentally killed to prevent them from hurting him.