What happened at the end of Tokyo Ghoul? I am a bit confused by Tokyo Ghoul season 2's ending. Why was Hide bitten, and by who or what? Was it in that "war"? Or did Kaneki bite him? 

And why did Yomo stop Touka when she was running to Kaneki (it was at the moment when he was carrying Hide)? Was it just because he did not wanted to let her be killed? Or was it something deeper?
Sadly, anime sacrifices a lots of plot details from manga in sake of 12ep seasons, so numerous things are just not explained. I've abandoned anime at around half of first season, so I will reference manga as explanation.

In a nutshell, main reason why Yomo stopped Touka was because he didn't wanted her to be killed indeed. He referenced this as "his last job in Anteiku". From all the talking of Yomo in manga Ch. 130, I assume, that main reason for Touka to say alive is that she can keep helping ghouls, who has lost their way in life, just like Anteiku crew were doing before.

Regarding Hide, it was heavily implied in chapters 136-137 of original manga, that Kaneki ate him. But Hide offered this by himself, since he knew that Arima is awaiting for Kaneki (and Kaneki was unable to resist his hunger, since he was in half-kakuja form). Maybe, in anime adaptation, events are slightly different, but outcome is same - Hide sacrificed his life to feed Kaneki, so Kaneki can heal his wounds and restore his power.