hey, im not EXACTLY sure, but i had that same question after i finished reading it and some people helped me out.
i think that...
spike and angel both died. and they were her loves, etc. so when she had the battle, she had them, in the form of a daughter (which she will give berth to) watching over her. so when, at the end, dawn rushes over saying that they saw the thing kill buffy, but shes not dead. its because buffy was killed, but the little girl saved her.. its confusing. but yeah, basically, the little girl is going to be born, and she is going to be VERY good, so that the balance between good and evil is restored again, because after angel and spike died, it was thrown of balance and stuff..
im not really sure, but thats my interpretation of it. i also have another where:
buffy did die, and shes in heaven, and so everythings good. <-- but this interpretation is pretty unlikely. haha.
anyways, i hope this helped you out!