Prayers (Salat) are primarily of two types; (i) obligatory- Fardh and (ii) voluntary(extra)-nafil.
Obligatory or compulsory - Fardh prayers are those which are to be offered at any cost what so ever and in any condition except when one looses its conscious. These obligatory prayers constitute 17 rakaat in number as follows:
Fajr: 2 rakaat
Dhur: 4 rakaat
Asr: 4 rakaat
Maghrib: 3 rakaat
Isha: 4 rakaat
Total: 17 rakaat
Voluntary (extra) - nafil prayers are those which are not obligatory but are offered by some one at his free will, to please Allah.
These voluntary - nafil prayers are categorized into 3 types by Islamic scholars while emphasizing their importance;
a) Sunnah prayers, further classified into; i) Mu'akadda and ii) Ghair Mu'akadda
b) Nafil prayers, and
c) Wajib prayers.
Sunnah Mu’akadda prayers are those non-obligatory prayers for which the Prophet sws was very particular and he sws emphasized his followers to offer them. But one shouls remain mindful that to offer sunnah Mu’kadda prayers is highly rewarding but one is not accountable if he does not offer these prayers. These prayers are as follows:
Fajr: 2 rakaat ( before 2 Fard)
Dhur: 4 rakaat (before 4 Fard) + 2 rakaat (after Fard)
Asr: No rakaat
Maghrib: 2 rakaat (after 3 Fard)
Isha: 2 rakaat (after 4 Fard)
Total: 12 rakaat
Sunnah Ghair Mu’akadda prayers are those non-obligatory prayers which the Prophet sws was neither particular nor emphasized to offer them. These prayers may be as follows:
Asr: 4 rakaat (before 4 Fard)
Maghrib: 2 rakaat (before 3 Fard)
Isha: 4 rakaat (before 4 Fard)
Nafil prayers are purely voluntary but Islamic scholars, for reasons best known to them, have prescribed them as follows:
Dhur: 2 rakaat after 2 sunnah Mu’akadda
Maghrib: 2 rakaat after 2 sunnah Mu’akadda
Isha: 2 rakaat after 2 sunnah Mu’akadda
Wajib prayer is also obligatory, but to a lesser degree. Witr prayer, after Isha, is considered Wajib by certain schools of thought, while some consider it as Sunnah Mu’akadda. Though its omission is strongly reprehensible, it does not specifically incur punishment.
There are no specific numbers of Witr rakaat. Odd numbers of rakaat (commonly 3) are offered as Witr prayers. The Prophet sws generally used to offer 10 or 13 rakaat as Witr. He sws also said to make Witr prayer as the last prayer of the day.