The Arabic word Hasad, the English equivalent of which is 'jealousy',is invariably used in the bad sense. It generally means to desire the deprivation of the other man rather than one's own acquisition of any bliss that he may possess.
Simply put, Hasad means that a person should feel unhappy at the better fortune and good quality that Allah has granted to another, and wishes that it should be taken away from the other person and given to him, or at least the other should be deprived of it. Hasad in this sense is totally forbidden and a major sin.
This is the first sin that was committed in the heaven and also the first one committed on the earth.
The Iblis was jealous of 'Adam alaihi salam in the heaven and the latter's son Qabil was jealous of his brother Habil on earth. [Qurtubi].
Ghibtah, on the other hand, means to desire for oneself the same blessing as the other man has, without any idea of the latter's losing it.This is not only permissible but also desirable.
Musnad of Ahmad records that a Jewish person cast a magical spell on the Holy Prophet sallallahu alaihi wasallam, as a result of which he fell ill. Jibra'il alaihi salam came to him and informed him that a particular Jew had cast a spell on him,that he had tied knots in his hair to accomplish this objective, and it is thrown into a particular well. The Holy Prophet sallallahu alaihi wasallam sent some of his Companions to bring it from the well Jibra'il alaihi salam had described. The Holy Prophet sallallahu alaihi wasallam untied the knots, and he was instantly cured. Jibra'il alaihi salam informed him of the name of the Jew and the Holy Prophet sallallahu alaihi wasallam knew the culprit, but it was not in keeping with his compassionate disposition to avenge anyone in his personal matter. Therefore, this was never brought to the attention of the Jew guilty of the black magic, nor did any sign of complaint ever appear on the blessed face of the Holy Prophet sallallahu alaihi wasallam. Being a hypocrite, he regularly attended the Holy Prophet's sallallahu alaihi wasallam gatherings.
One day the Holy Prophet sallallahu alaihi wasallam said to Sayyidah 'A'ishah radi'Allahu anha that Allah has shown him what his illness was and added: "Two men came to me in my dream. One of them sat by my head side while the other sat by my feet, and the following conversation ensued:
Question: 'What is wrong with this man?'
Answer: 'He is bewitched.'
Question: 'Who has bewitched him?'
Answer: 'Labid Ibn A'sam. He is a member of the tribe of Banii Zuraiq who is an ally of the Jews, a hypocrite.'
Question: 'With what did he bewitch him?'
Answer: 'With a comb and hair from the comb.'
Question: 'Where is the comb?'
Answer: 'In the dried bark of a male date palm under a rock in a well called Dharwan.' "
Sayyidah 'A'ishah radi'Allahu anha says that the Holy Prophet sallallahu alaihi wasallam went to the well to remove the comb with the hair and said: "This is the well I was shown in my dream." He removed it from the well. Sayyidah 'A'ishah radi'Allahu anha asked the Holy Prophet sallallahu alaihi wasallam: "Will you not make this public?" He replied: "Allah has cured me and I hate to cause harm to anyone." This implies that the Holy Prophet sallallahu alaihi wasallam did not want to be the cause anyone's molestation, death or destruction, because this is what would have exactly happened if the incident was publicised. (Sahih Bukhari).
According to a narration in Musnad of Ahmad, this illness of the Holy Prophet sallallahu alaihi wasallam lasted for six months. According to other narratives, some of the Companions knew that this wicked act was performed by Labid Ibn A'sam, and they courteously said to the Holy Prophet sallallahu alaihi wasallam: "Why should we not kill this wicked person?" He made the same reply to them as he did toSayyidah 'A'ishah radi'Allahu anha.
According to Imam Tha'labi's narration, a Jewish boy was the attendant of the Messenger of Allah sallallahu alaihi wasallam, the hypocritical Jew flattered the boy and talked him into getting for him strands of the Prophet sallallahu alaihi wasallam's hair from his comb, and a few of its teeth. Having obtained these items, he tied 11 knots on a string and a needle was stuck into each knot. Labid then placed this spell in the spathe of a male palm tree,and buried it under a stone in a well. On this occasion, the two Surahs (Surah Al-Falaq & Surah An-Nas) were revealed, comprising eleven verses. The Messenger of Allah sallallahu alaihi wasallam recited one verse at a time and untied one knot each time, until all the knots were untied, and he felt freed from the tension of the witchcraft.
[All these narratives have been adapted from Ibn Kathir.]
Source copied from-Ma'ariful Qur'an (Surah Al-Falaq), pg 918-920