What are fard, wajib and Sunnah?

Prayer is an act of worship comprising prescribed words and actions, beginning with the opening takbir and ending with the salam. God commands that it be established in remembrance of Him. When a man asked the Prophet ﷺ what God had made obligatory during the day and night, he explained the five daily prayers and then pointed him to voluntary worship. These lessons cover what a worshipper needs alongside the obligatory prayers and their regular Sunnah prayers.

An individual obligation (fard ayn) is required of every accountable person who meets its conditions, such as the five daily prayers. A communal obligation (fard kifayah), such as the funeral prayer for a Muslim, is fulfilled when enough people perform it; if all who are able and aware neglect it, they are sinful. The majority generally use fard and wajib interchangeably, while Hanafis distinguish them according to the strength of the evidence; both are binding in their school. This distinction affects the rulings on Witr and the two Eid prayers.

A recommended act (mandub) is encouraged without being obligatory; an emphasized Sunnah is among its stronger forms. The rawatib are voluntary prayers associated with obligatory prayers before or after them, such as the Sunnah before Fajr. Other prayers are associated with a separate time, such as Duha, or an occasion, such as entering a mosque. Unrestricted voluntary prayer is performed without a specified time or occasion. “Special prayers” brings these subjects together for teaching; each act has its own ruling.

Al-Kasani, Bada'i' al-Sana'i', Book of Prayer, chapter on obligatory types of prayer. Ibn Rushd, Bidayat al-Mujtahid, Book of Prayer, Chapters on Voluntary Prayer and the Two Eids.