satan is a jinn - demon like spirit and therefore is able to choose. He was in the company of the angels due to his peity but showed his true nature when he refused to obey God and bow down to Adam (upon him peace). Therefore he was thrown out of heaven and he swore to lead mankind astray from it ever since.
He says that he was created from fire and Adam from clay and that fire is better from clay. Thus showing his arrogance!
Angels are made soley for the worship of God/Allah and therefore can only obey because thats why they were created.