The 'Eid Prayer is a prayer performed on both of the 'Eid celebrations, 'Eid-ul-Aḍḥā and 'Eid-ul-Fiṭr. 'Eid-ul-Fiṭr takes place after Ramaḍān (the month of fasting) ends, and 'Eid-ul-Aḍḥā takes place after Hajj (the time of pilgrimage to Makkah) is completed.
The prayer consists of the the imām leading the people in praying two rak'ah. This is because of the following narrations:
It was narrated that Abu Sa'eed al-Khudree (may Allah be pleased with him) said:
"The Messenger of Allah (may the Peace and Blessings of Allah be upon him) used to come out on the day of ['Eid] al-Fiṭr and ['Eid] al-Aḍḥaa to the prayer place, and the first thing he would do was to offer the prayer." [al-Bukhārī: 956]
'Umar (May Allah be pleased with him) said:
"The prayer of al-Fiṭr is two rak'ah and the prayer of al-Aḍḥaa is two rak'ah, complete and not shortened; [this came] from the mouth of your Prophet (may the peace and blessings of Allah be upon him)." [an-Nasā'ī: 1420]
The scholars differed concerning the ruling on 'eid prayers, with some considering it a highly recommended action, and others considering it a communal obligation. However, due to the fact that many of the scholars - among them Abū Ḥaneefah (may Allah have mercy on him) - considered the attendance to be an individual obligation upon every Muslim male, the safer of the opinions is to consider it obligatory for every Muslim man, and Allah knows best.
From the evidence for the obligation of praying this prayer is the following:
1 – The verse in which Allah says:
"Therefore turn in prayer to your Lord and sacrifice (to Him only)" [The Qur'an: al-Kawthar 108:2]
Ibn Qudāmah said in al-Mughni: "The well-known view is that what is meant by this is the Eid prayer."
2 – The fact that the Prophet (may the peace and blessings of Allah be upon him) commanded all of the people to go to the 'eid prayer, including men and women, as well as those women who were of marriagable age (and wouldn't traditionally leave the home), and those who were menstruating.
Umm 'Atiyyah (may Allah be pleased with her) said:
"The Messenger of Allah (may the peace and blessings of Allah be upon him) commanded us to bring the women out on ['Eid] al-Fiṭr and ['Eid] al-Aḍḥaa, and to bring out adolescent girls, menstruating women and those of marriagable age; the menstruating women were to stay away from the prayer, but were to witness goodness and the gathering of the Muslims. I said: 'O Messenger of Allah, what if one of us does not have a jilbāb (outer garment)?' He said: 'Let her sister lend her a jilbāb.'" [al-Bukhari: 324, Muslim: 890]
The 'eid prayer differs in some ways from other prayers. In the first rak'ah you should say takbeerat-ul-ihraam (the opening takbeer), after which you should say takbeer ("Allahu Akbar") six more times, because of the hadeeth of 'Aa'ishah (may Allah be pleased with her):
"The takbeer of al-Fiṭr and al-Aḍḥaa is seven before reciting in the first [rak’ah], and five before reciting in the second, apart from the takbeer of rukoo'." [at-Tirmidhī: 536; Ibn Mājah: 1280]
Then you should recite al-Fātiḥah, and recite Sūrah Qaaf in the first rak'ah. In the second rak'ah you should stand up, saying takbeer. When you have stood up completely you should say takbeer five more times, then recite al-Fātiḥah then Sūrah al-Qamr. The Prophet (may the peace and blessings of Allah be upon him) used to recite these two chapters of the Qur'an during the two 'eid prayers. If you wish, you can recite Sūrah al-A'laa in the first rak'ah and Sūrah al-Ghāshiyah in the second, because it was narrated that the Prophet (may the peace and blessings of Allah be upon him) used to also recite these two chapters in the 'eid prayer. These things are mentioned in the following narrations:
"'Umar (may Allah be pleased with him) went out on the day of 'Eid and sent word to Abu Wāqid Al-Laythee (may Allah be pleased with him) asking what the Prophet (may the peace and blessings of Allah be upon him) used to recite on this day. He said: 'Qaaf' [Qaaf 50] and 'Iqtarabat' [al-Qamar 54] " [Ibn Mājah: 1282]
It was narrated from Ibn 'Abbās (may Allah be pleased with him) that:
"The Prophet (may the peace and blessings of Allah be upon him) used to recite in the 'eid prayer 'Glorify the Name of your Lord, the Most High.' [al-A'laa 87] and 'Has there come to you the narration of the overwhelming?' [al-Ghāshiyah 88]" [Ibn Mājah: 1283]
After the prayer, the imām should address the people in a sermon (known in Arabic as a khuṭbah). Part of the khuṭbah should be addressed specifically to the women, telling them of the things that they should do and warning them against the things that they should avoid, as the Prophet (may the peace and blessings of Allah be upon him) used to do:
"I attended the prayer with the Messenger of Allah (may the peace and blessings of Allah be upon him) on the day of 'eid. He started with the prayer before the khuṭbah, with no adhaan and no iqāmah. When he finished the prayer, he stood leaning on Bilal, and he praised and glorified Allah and exhorted the people, reminding them and urging them to obey Allah. Then he moved away and went to the women, and Bilal was with him. He commanded them to fear Allah and exhorted them and reminded them. He praised and glorified Allah, then he urged them to obey Allah, then he said: 'Give charity, for most of you are the fuel of Hell.' A lowly woman with dark cheeks said: 'Why, O Messenger of Allah?' He said: 'You complain a great deal and are ungrateful to your husbands.' They started taking off their necklaces, earrings and rings, throwing them into Bilal's garment, giving them in charity." [an-Nasā'ī: 1575]
One of the rulings of Eid is that the prayer comes before the khuṭbah, because of the hadeeth of Jābir ibn 'Abdullāh (may Allah be pleased with him) who said:
"The Prophet (may the peace and blessings of Allah be upon him) came out on the day of al-Fiṭr and started with the prayer before the khutbah." [al-Bukhari: 958, Muslim: 885]
Another indication that the khuṭbah comes after the prayer is the hadeeth of Abū Sa'eed (may Allah be pleased with him) who said:
"The Messenger of Allah (may the peace and blessings of Allah be upon him) used to come out to the prayer place on the day of al-Fiṭr and al-Aḍḥaa, and the first thing he would start with was the prayer, then he would go and stand facing the people, while the people were sitting in their rows, and he would preach to them and advise them and command them. If he wanted to send out a military expedition he would do so and if he wanted to tell the people to do something he would do so, then he would leave..." [al-Bukhari: 956]
"I attended the 'eid prayer with the Messenger of Allah (may the peace and blessings of Allah be upon him). He led us in offering the 'eid prayer, then he said: 'I have finished the prayer. Whoever wants to sit (and listen to) the sermon, then let him sit, and whoever wants to leave, then let him leave.'" [Ibn Mājah: 1290]
"On the occasion of the 'eid, the Prophet (may the peace and blessings of Allah be upon him) would proceed to the prayer place taking one route and returning from another." [al-Bukhari: 986].
The Jumu'ah (Friday congregational prayer) becomes optional if 'Eid falls on a Friday:
"I heard a man asking Zaid ibn Arqam: 'Were you present with the Messenger of Allah (may the peace and blessings of Allah be upon him) when there were two 'eid [i.e., Friday and 'eid] on one day?’ He said: 'Yes.' He said: 'What did he do?' He said: 'He prayed the 'eid prayer, then he granted a concession not to pray the Friday, then he said: "Whoever wants to pray (the Friday prayer), let him do so." [Ibn Mājah: 1310]Note that if Friday prayer is missed, Dhuhr prayer must be performed instead, regardless of whether or not 'eid has been prayed.
"The Messenger of Allah (may the peace and blessings of Allah be upon him) enjoined Zakāt-ul-Fiṭr as a purification for the fasting person from idle talk and obscenities, and to feed the poor. Whoever gives it before the ('eid) prayer, it is an accepted Zakāh, and whoever pays it after the prayer, it is just an (ordinary) charity." [Ibn Mājah: 1827]As for the Zakāt-ul-Fiṭr, it is a ṣaa' of the country's staple food (such as rice, wheat, dates, and so on). A ṣaa' is a measure of volume which has been calculated as 3 litres, so a bag or a box that has 3 litres in volume should be filled with the food and given to a poor person. It is permissible to give money to an organisation to distribute the food on your behalf, but it must be distributed as food, and not as money, and the distribution must occur before the 'eid prayer.