In the novel, Ender's Game, Ender fought to win in the games he played. When he discovered that the battles were real, he wanted to understand his enemy. To me, his question was, "Who are these beings and why would they attack?'' He truly wanted to know if the war could have been avoided if Ender's people had handled the foe differently. Were they truly the enemy? With his dreams and visions, he had felt like he was being contacted by them, and the cocoon confirmed his feelings.
This novel, which I love, is followed by a series of books which follow Ender and a series which follows Bean. Be sure to look at the others whichever series you choose to read.