The dragon is identified in Revelation 12 as the devil, or Satan. He is the one formerly known as Lucifer who was created perfect but whose wisdom became corrupted because of his beauty. He convinced other angels to join him in a coup against God which was unsuccessful. He, and the angels that joined him were cast down from the mountain of God. They are no longer a part of God’s kingdom and never can be again.
The dragon is described as having seven heads. These heads represent seven kingdoms that have subjugated the children of Israel. The last five are described in Daniel as having come into existence through the influence of specific evil angels. The seventh kingdom is being shaped now and will lead to the rise of the false prophet.
Whenever Satan and his angels get cast out of heaven and are confined to earth, they realize that their time is short. That’s when the evil trio make their final desperate push to “break” prophecy through the use of the mark and the image.