Crying is well known; it refers to tears from the eyes.
As for wailing, according to the scholars has to do with words and sounds that come from the woman or man who is wailing. The words referred to here are eulogizing, listing his good qualities, keening (the well known chanting of women when they wail and lament), screaming and other well-known actions that are done by wailing women.
Some fuqaha' say that this applies if there is also crying, and others say that it is not necessarily accompanied by crying; rather it is connected to the actions of wailing mentioned above.
In the hadeeth: it was narrated that Abdullah ibn Umar (may Allah be pleased with him) said: Sad ibn Ubaadah fell sick and the Prophet (blessings and peace of Allah be upon him) came to visit him with Abd al-Rahmaan ibn Awf, Sad ibn Abi Waqqaas and Abdullaah ibn Mas'ood (may Allah be pleased with them). When he entered upon him, he found him unconscious with his family around him and he said: Has he died? They said: No, O Messenger of Allaah. The Prophet (blessings and peace of Allah be upon him) wept, and when the people saw the Prophet (blessings and peace of Allah be upon him) weeping, they also wept. He said: Listen, Allaah does not punish for the tears of the eye or the grief of the heart, rather He punishes for this - and he pointed to his tongue - or shows mercy (because of it).
Narrated by al-Bukhaari, 1304; Muslim, 924
It was narrated that Usaamah ibn Zayd said: We were with the Prophet (blessings and peace of Allah be upon him) and one of his daughters sent word to him, calling him and informing him that a child of hers - or a son of hers - was dying. He said to the messenger: Go back to her and tell her that to Allaah belongs that which He has taken, and to Him belongs what He gives, and everything has an appointed time with Him. Tell her to be patient and seek reward. Then the messenger came back and said: She is adjuring you to come to her. The Prophet (blessings and peace of Allah be upon him) got up, and Sad ibn Ubaadah and Muadh ibn Jabal got up with him, and I went with them. The child was lifted up to him and his soul was rattling like water poured into a waterskin. His eyes filled with tears and Sad said to him: What is this, O Messenger of Allaah? He said: This is compassion that Allaah has instilled in the hearts of His slaves. Allaah only shows mercy to the merciful ones among His slaves.
Narrated by al-Bukhaari, 1284; Muslim, 923
An-Nawawi (may Allah have mercy on him) said:
What this means is that Sad thought that all kinds of crying or weeping were haraam, and that tears from the eye are haraam, and he thought that the Prophet (blessings and peace of Allah be upon him) had forgotten that, so he reminded him. But the Prophet (blessings and peace of Allah be upon him) taught him that simply crying or shedding tears from the eye is not haraam or makrooh; rather it is mercy and a virtue. What is haraam is wailing and lamenting and crying that is accompanied by both or one of them. End quote.
And Allah knows best.
Reproduced from Islam QA