The Woman and the Dragon
The latter part of today's passage is definitely a weird scene. What's going on in chapter 12? Though there isn't complete agreement, here is what the majority of people think about the symbolism:
The woman and the child:
"The support for this identification of the woman is found in the description of her as being clothed with the sun, with the moon under her feet, and on her head a garland of twelve stars (v. 1). This has obvious reference back to Joseph’s dream in Genesis 37:9, in which the sun and moon and twelve stars (eleven plus Joseph) represented the family of Jacob, the people of Israel. That the Child is Christ is supported by the fact that He is to rule all nations with a rod of iron (v. 5), a promise first made to Christ in Psalm 2:9 and repeated in Revelation 19:15." 
More specifically, this is the remnant of messianic Israel, the 144, 000 mentioned earlier in the book.
The dragon - Satan, as revealed in verse 9. This description is different than some given before, and this is thought by many to be an indication that He is tied to the beast in the next chapter.
So what is going on here? The symbolism is definitely difficult, but is usually taken to mean that in the last days during the tribulation, Satan will through his actions force the 144,000 Jews that have turned to Christ to flee into the desert to hide. The war in heaven refers to this real event:
"The event here prophesied was predicted by Daniel the prophet in Daniel 12:1, where it is recorded that Michael shall “stand up, the great prince which standeth for the children of thy people.” This event marks the beginning of the Great Tribulation defined in Daniel 12:1. It is undoubtedly the same event as in Revelation 12." 
Most agree that these events will take place halfway through Tribulation and will usher in the Great Tribulation that will be in the latter half of the last 7 years of the earth. Satan is cast down and wreaks further havoc in the world than he already has, in addition to the wrath of God being poured out upon the world already.
Whew - difficult stuff today. I want to stress again that I and others are doing our best to understand things and that any attempt at a "timeline" of the end times is just that - an attempt. Hopefully this helps a bit, but with all of the symbolism and times and stuff mentioned, I know it can still be confusing.
 Ibid, Re 12:7–12.