I have heard that Shaytan is an Angel but then Angels do not have free will so this means he has to obey Allah, but he did have free will because he did not prostrate to Adam (عليه السلام) when Allah commanded him to do so.
And (remember) when We said to the angels: "Prostrate yourselves before Adam." And they prostrated except Iblis (Satan), he refused and was proud and was one of the disbelievers (disobedient to Allah)"
I have also heard that he is a jinn.
And (remember) when We said to the angels; "Prostrate to Adam." So they prostrated except Iblis (Satan). He was one of the jinns; he disobeyed the Command of his Lord.