Kerrigan either turns back into the Zerg hybrid, or she's a clone created by Mengsk so that he could take control of the Zerg armies for himself.

It appears that up until now, the Zerg have always been controlled by some nefarious overmind. In this case, Arcturus Mengsk has been working with Kerrigan (or a clone) for some time and possibly controlling her. So the Zerg's actions (in WoL or HotS) were all the result of Mengsk's decisions. He has a lab full of Kerrigan (human) clones with PSI abilities that can reach out to Zerg/Kerrigan to hurt and possibly control her.

Mengsk calls her his greatest failure, and then she and Raynor kill Mengsk. The Zerg/Kerrigan also appears to be super-PSI powered as well. =]

Basically, the Zerg are finally free from all control and can now decide their own destiny. In the end, Raynor asks "What now?" Kerrigan responds with, "I keep my end of the bargain, and leave humanity to it's fate. The Zerg are free now.. slaves to no one, not even me. So whether they be the bringers of light or destroyers of worlds, I'll help them find the answer out there amongst the stars."