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.
Quran 2:34:
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.
Quran 18:50:
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.