At the end of Jesus's 1,000-year reign, Heavenly Father will set Satan loose and restore him to power. So many of the people living at that time will reject Jesus and become Satan's followers that wickedness will prevail upon the earth. Satan will then gather all his followers together with the hosts of hell into an army to make war on the followers of Jesus.
Sources:
• Gospel Fundamentals, (2002), Chapter 34: The Millennium, Part Nine: The Second Coming of Jesus Christ
• Doctrines of the Gospel Student Manual, (2000), 104–6
• Gospel Principles, (2011), 263–67
• Bailey, Arthur A. "What Modern Revelation Teaches about Adam". Ensign Magazine of the LDS Church. January 1998.
Then Adam, the first man—also known as the archangel Michael—will gather the hosts of heaven and lead the armies of Heavenly Father to fight against the forces of Satan. The ensuing clash will be the last great battle of the earth.
In the end, Satan and his armies will be expelled from the earth forever. They will be cast away into their own place prepared for them in the beginning—the lake of fire and brimstone where they are doomed to suffer the wrath of God for all eternity.
NEXT:
Also from the creator of The Brick Book of Mormon: