Satan is a very powerful spiritual being who does not want humans to be saved by Christ. He is not equal in power to God, but is allowed some freedom in order to test humans. He used to serve God in some function, but rebelled over something, I don't think it's ever explicitly stated in the Bible over what.
I'm not sure it's explicit in the Bible, but it's probably buried in some apocrypha. Satan supposedly after creating the stars - thus the name Lucifer, the light bringer - took pride in his work and sought to make his position amongst the holy choir more powerful, this pride forced a schism between him and God and some of his angels, who were then cast from heaven. Something like that.