"Till the Day of the time appointed."
Allah mentions this story in Surah Al-Baqarah, at the beginning of Surah Al-A`raf, in Surah Al-Hijr, Al-Isra', Al-Kahf and here.
Before creating Adam, peace be upon him, Allah told the angels that He was going to create a human being from sounding clay of altered smooth black mud. He told them that when He finished creating and forming him, they were to prostrate to him as a sign of honor and respect, and out of obedience to the command of Allah, may He be exalted. All of the angels obeyed this command except for Iblis, who was not one of them. He was one of the Jinn, and his nature betrayed him at his time of greatest need. He refused to prostrate to Adam, and he disputed with his Lord about him, claiming that he was better than Adam, because he was created from fire while Adam was created from clay, and fire was better than clay, or so he said. He made a mistake by doing this, and he went against the command of Allah, thus committing the sin of disbelief. So Allah exiled him, humiliated him, and cast him out of His mercy and His sacred Presence, and called him "Iblis" symbolizing that he had Ablasa min Ar-Rahmah (despaired of mercy) -- that there was no hope for him of mercy. He cast him down from the heavens, disgraced and rejected, to the earth.
Iblis asked Allah to give him a reprieve until the Day of Resurrection, so the Forbearing One, Who does not hasten to punish those who disobey Him, gave him a reprieve. When he knew that he was safe from destruction until the Day of Resurrection, he rebelled and transgressed.
قَالَ فَبِعِزَّتِكَ لَااُغْوِيَنَّهُمْ أَجْمَعِينَ