Revelation 12:7-9 (NIV)
And there was war in heaven. Michael and his angels fought against the dragon, and the dragon and his angels fought back. But he was not strong enough, and they lost their place in heaven. The great dragon was hurled down--that ancient serpent called the devil, or Satan, who leads the whole world astray. He was hurled to the earth, and his angels with him.
The only glimpse we have of the origin of Satan and demons. Here we find they were angels who rebelled against God. This must have happened recently after God created the world because we are first introduced to the serpent in Genesis three when he beguiled Eve. I believe the following verse is a description of Satan.
Isaiah 14:12-15 (NIV)
How you have fallen from heaven, O morning star, son of the dawn! You have been cast down to the earth, you who once laid low the nations! You said in your heart, "I will ascend to heaven; I will raise my throne above the stars of God; I will sit enthroned on the mount of assembly, on the utmost heights of the sacred mountain. I will ascend above the tops of the clouds; I will make myself like the Most High." But you are brought down to the grave, to the depths of the pit.
I believe Satan was perhaps God's top angel of the rank of Cherubim who attended to God in his throne room in heaven. He was such a magnificent creature, that he got the big head. Thus began the sin of pride which is the root of all of our problems.
My favorite verse about Satan is the next verse however. Now we fear him as we would an evil giant. But one day when we see him for who he truly is (or has become!), we will see how silly it was for us to fear him.
Isaiah 14:16 (NIV)
Those who see you stare at you, they ponder your fate: "Is this the man who shook the earth and made kingdoms tremble...?"