Allah says: " And (remember) when We said unto the angels: "Fall prostrate before Adam", and they fell prostrate, all save Satan. He was of the jinn, so he rebelled against his Lord's command. Will you choose him and his progeny for your protecting friends instead of Me, when they are an enemy unto you? Calamitous is the exchange for evil-doers." [Sûrah al-Kahf: 50]

The sacred texts indicate that the jinn and the angels are two separate creations of Allah. The Jinn were created from a flame of fire, while the angels were created from light. The Qur'ân states this clearly in Sûrah al-Rahmân, verse 15:
And He created the jinn of a flame of fire.
The Prophet (peace be upon him) said: "Allah created the angels from light. He created the jinn from a flame of fire, and He created Adam from what was described to you." [Sahîh Muslim (5314)]

Scholars differ regarding whether Satan was from the jinn or from the angels. Some scholars argue that he is from the angels, since Allah's command to the angels applied to Satan as well. They cite verse 34 of Sûrah al-Baqarah:
And when We said unto the angels: "Fall prostrate before Adam." They fell prostrate, all except Satan. He refused and was haughty. He was of those who reject faith.
However, the apparent meaning of what the Qur'ân says about Satan elsewhere indicates that he was is indeed from the jinn. The same story of Satan's refusal to bow down is given in the Qur'ân in other places where it is indicated that Satan is from the jinn, though he was in the assembly of the angels and was commanded to bow down to Adam along with them. Sûrah al-A`râf (7): verses 10-12 reads:
And We created you, then fashioned you, then told the angels: "Fall prostrate before Adam!" And they fell prostrate, all save Satan, who was not of those who make prostration.

(Allah) said: "What hindered you so that you did not prostrate when I commanded you?"

He said: "I am better than him: You had created me of fire, while him You created from clay."
Verse 50 of Sûrah al-Kahf talks about precisely the same incident and is explicit in stating that Satan is from the jinn:
And (remember) when We said unto the angels: "Fall prostrate before Adam", and they fell prostrate, all save Satan. He was of the jinn, so he rebelled against his Lord's command. Will you choose him and his progeny for your protecting friends instead of Me, when they are an enemy unto you? Calamitous is the exchange for evil-doers.
We should not understand from Allah's words: "He was of the jinn, so he rebelled.." that Satan had to disobey Allah because he was from the Jinn. There are jinn who obey Allah and are pious Muslims. Rather, we can understand from the verse that Satan had the ability to disobey Allah because he was from the jinn. This is because, as one of the Jinn, he possesses free will and can choose to disobey Allah's command. The angels, by contrast, always obey Allah.

Those who argue that Satan is a fallen angel try to explain the statement "He was of the jinn" with a number of unconvincing explanations. Some have argued that Satan might have been from a tribe of angels or a group of angels called the "Jinn". Others quote Jewish and Christian traditions about Lucifer to support their claim.

Ultimately, the question remains a matter of the Unseen. And Allah knows best.