Somewhere in time when God created the universe and planned to create man this happened:
And [mention, O Muhammad], when your Lord said to the angels, "Indeed, I will make upon the earth a successive authority." They said, "Will You place upon it one who causes corruption therein and sheds blood, while we declare Your praise and sanctify You?" Allah said, "Indeed, I know that which you do not know."
(Quran, al-Baqarah 2: 30).
And when God created man this followed :

And He taught Adam the names - all of them. Then He showed them to the angels and said, "Inform Me of the names of these, if you are truthful." They said, "Exalted are You; we have no knowledge except what You have taught us. Indeed, it is You who is the Knowing, the Wise." He said, "O Adam, inform them of their names." And when he had informed them of their names, He said, "Did I not tell you that I know the unseen [aspects] of the heavens and the earth? And I know what you reveal and what you have concealed." And [mention] when We said to the angels, "Prostrate before Adam"; so they prostrated, except for Iblees. He refused and was arrogant and became of the disbelievers.
(Quran, al-Baqarah 2: 31-34).

Conversation between God and Satan:
(Allah) said: "O Iblees (Satan)! What is your reason for not being among the prostrators?"
(Iblees (Satan)) said: "I am not the one to prostrate myself to a human being, whom You created from sounding clay of altered black smooth mud"
(Quran, al-Hijr: 32 – 33).

(Allah) said: "Then, get out from here, for verily, you are Rajeem (an outcast or a cursed one)."
"And verily, the curse shall be upon you till the Day of Recompense (i.e. the Day of Resurrection)"

(Quran, al-Hijr: 34 – 35).

“(Iblees) said: ‘Because You have sent me astray, surely, I will sit in wait against them (human beings) on Your straight path. Then I will come to them from before them and behind them, from their right and from their left, and You will not find most of them as thankful ones (i.e. they will not be dutiful to You)''
(Quran, Al-Aaraf: 16,17).

Learning:
The common learning that everyone concludes from the above story is not to be arrogant. Do what God asks you to do and follow Him in whichever path He asks you to.

However, what we don’t understand is that even when Satan was being cursed and exploded, he prayed to God and asked Him to give him a long life and permission to deviate human beings from the righteous path. So, Satan taught us that even when you are full of sins and wickedness, you should not stop praying to God. We should believe that God accepts prayers from all-- even from the sinned and wicked creations like Satan.

"Come, come again, whoever you are, come!
Heathen, fire worshipper or idolatrous, come!
Come even if you broke your penitence a hundred times,
Ours is the portal of hope, come as you are."

(Rumi)


John was a simpleton. He prayed regularly and was kind towards all. He had an apple orchard and he was proud of its produce. But such was his kindness that he wanted to distribute this produce freely to one and all. So he put up a board at the orchard’s entrance.
“Enter and eat. Of Lord it is and for His creation it is.”
He eagerly waited for the passersby to stop at the orchard and enjoy the sweet fruits of his labour. However, he was in for a great disappointment. None will come and enjoy the fruits. Everyone would pass by ignoring the board. John got worried. The apples had begun to rot.
So, he made up his mind and put up a new board the next day.
“Finest of the fruit of all the country, but price lavishly luxurious.”
With bated breath, he waited. And he was not disappointed. The word gradually spread around and people from all corners of the locality began flocking to the orchard. Everyone wanted to have a share of the “finest” apples in the country.
The fruits were soon gone.

Now wiser, John put up a new board at the gate of his orchard.
“Whatever is free is worthless!”


Once in a garden, there sprang up a flower. It was so beautiful that all the flowers and plants in the garden would talk of its beauty and were envious of it. One day the flower heard a flabby voice from below. It looked down, and there was none. Again it heard a voice and looked down; it was the soil beneath it calling. The part of the soil below the flower uttered, "Oh thee the magical being thy presence hath graced me."  The flower humbly replied, "Thank You." To this, the piece of soil said, "Your presence has blessed me, for I was a filthy part of dirt. thy bearing hath brought along a scent. Now I can feel the aroma in me. Your holiness has sanctified me." The flower, again in humility, replied, "Thank you." In a courageous tone, the piece now said, "Oh thine beatified being, I am in love with thou." The flower smiled, grimaced and said, " Oh my dear, nah, it ain`t love it's just an infatuation." The piece of soil looked amazed, and the flower continued, "I am here this season with you, you see me each day, and you adore my beauty, but when I am gone, you will forget me, and your memory will blank out. Then another year another flower will grow, a more lovely one that will put back my thoughts deep underneath you. Oh, my dear! for love is aloof of distance and time, beauty and scent, colour and condition." The part of the soil remained silent as he had never felt anything like this before and knew nothing to say.
Autumn came and the flower died but its seeds went deep into the heart of this piece of soil. There was joy and there was grief. A part of the beloved lived within it now and the beloved was lost in the dust. Spring came but there was no rejoice nor any delight. The clouds came and the clouds left not a single drop of water fell on the ground. The seed lying inside the heart of the soil. Another season came and again no moisture to bear upon the soil. Then the third spring came and finally came the rain. It poured hope and savour. There grew a sprout out of the soil and in a hebdomad it bloomed into the flower. On opening its eyes the flower heard some voice. Yeah it had heard the same some seasons before. It looked down and said, " Oh the piece of earth, you still lay there. I thought the chilly wind carried me to the distant east where there is nothing but barren land." "No" replied the soil. "All these seasons thou remained in my heart. Thou were here yet thou were not. Thou were near yet thou were far. My beloved all these seasons I cried and cried and mine drops of sorrow became the moisture to sustain thine existence in mine heart. My infatuation for thee grew strong and strong with each passing day . It passed the test of distance and time and here again Oh! the beautiful being, I say to thee that I love you and my love for you is true ."
Don`t call them Tears,
These are the precious pearls
Seated in the lonely nights,
Waiting to see my mother’s face
Echoing from the gandering vision,
I wept to understand
The law of mortality,
And spilled blood on earth
Mortality & unpleasure,
Roam my city
And Ah! I wait here,
Just for a glimpse of her face,
But I know the longing wait,
Is not going to end and so my tears…
Will flow fleetly on my face!