Question: "What does Revelation chapter 12 mean?"
Answer: In Revelation chapter 12, John sees a vision of a woman "clothed with the sun, and the moon under her feet, and on her head a crown of twelve stars" (Revelation 12:1). Note the similarity between this description and the description that Joseph gave of his father Jacob (Israel) and his mother and their children (Genesis 37:9-11). The twelve stars refer to the twelve tribes of Israel. So the woman in Revelation 12 is Israel.
Additional evidence for this interpretation is that Revelation 12:2-5 speaks of the woman being with child and giving birth. While it is true that Mary gave birth to Jesus, it is also true that Jesus, the son of David from the tribe of Judah, came from Israel. In a sense, Israel gave birth—or brought forth—Christ Jesus. Verse 5 says that the woman’s child was "a male child, who is to rule all the nations with a rod of iron; and her child was caught up to God and to His throne." Clearly, this is describing Jesus. Jesus ascended to heaven (Acts 1:9-11) and will one day establish His kingdom on earth (Revelation 20:4-6), and He will rule it with perfect judgment (the “rod of iron”; see Psalm 2:7-9).
The woman’s flight into the wilderness for 1,260 days refers to the future time called the Great Tribulation. Twelve hundred, sixty days is 42 months (of 30 days each), which is the same as 3 1/2 years. Halfway through the Tribulation period, the Beast (the Antichrist) will set an image of himself up in the temple that will be built in Jerusalem. This is the abomination that Jesus spoke of in Matthew 24:15 and Mark 13:14. When the Beast does this, he breaks the peace pact he had made with Israel, and the nation has to flee for safety—possibly to Petra (also see Matthew 24; Daniel 9:27). This escape of the Jews is pictured as the woman fleeing into the wilderness.
Revelation 12:12-17 speaks of how the devil will make war against Israel, trying to destroy her (Satan knows his time is short, relatively speaking—see Revelation 20:1-3, 10). It also reveals that God will protect Israel in the wilderness. Revelation 12:14 says Israel will be protected from the devil for "a time, times, and half a time (“a time” = 1 year; “times” = 2 years; “half a time” = one-half year; in other words, 3 1/2 years).