The essential parts of Hajj are four, the obligatory actions are seven and everything other than the essential parts and obligatory actions is Sunnah. A detailed discussion follows:
Al-Bahooti (may Allah have mercy on him) said in ar-Rawd al-Murbi‘ (1/285):
The essential parts of Hajj are four:
Entering ihram, which is forming the intention to start the rituals of Hajj, because of the hadith: “Actions are but by intentions.”
Standing in ‘Arafah, because of the hadith: “Hajj is ‘Arafah.”
Tawaaf az-ziyaarah (also called tawaaf al-ifaadah), because Allah, may He be exalted, says (interpretation of the meaning): “…and [let them] circumambulate the Ancient House (the Ka‘bah at Makkah)” [al-Hajj 22:29].
Sa‘i, because of the hadith: “Do sa‘i, because Allah has ordained sa‘i for you.” Narrated by Ahmad.
The obligatory actions of Hajj are seven:
Entering ihram at the appropriate miqaat, i.e., one should enter ihram from the miqaat. As for ihram itself, it is an essential part of Hajj.
Standing in ‘Arafah until sunset, for the one who reaches there by day.
Saying overnight in Mina during the days of at-Tashreeq (the 11th, 12th and 13th of Dhu’l-Hijjah), except for those whose job is to bring water and tend livestock.
Staying overnight in Muzdalifah until after halfway through the night, for those who reach it before that time, except for those whose job is to bring water and tend livestock. [Some scholars regard staying overnight in Mina as one of the essential parts of Hajj without which Hajj is not valid. Ibn al-Qayyim (may Allah have mercy on him) expressed this view in Zaad al-Ma‘aad (2/233)].
Stoning the Jamaraat in the right sequence.
Shaving the head or cutting the hair.
Farewell tawaaf (tawaaf al-wadaa‘).
[If the pilgrim is doing tamattu‘ (‘umrah followed by Hajj, exiting ihram in between) or qiraan (‘umrah followed by Hajj without exiting ihram in between), then he must offer a sacrifice (by slaughtering a sheep), because Allah, may He be exalted, says (interpretation of the meaning): “whosoever performs the ‘Umrah in the months of Hajj, before (performing) the Hajj, (i.e. Hajj-at-Tamattu‘ and Al-Qiran), he must slaughter a Hady such as he can afford, but if he cannot afford it, he should observe Saum (fasts) three days during the Hajj and seven days after his return (to his home), making ten days in all. This is for him whose family is not present at Al-Masjid-al-Haram (i.e. non-resident of Makkah)” [al-Baqarah 2:196]].
The rest of the actions and words of Hajj are Sunnah, such as tawaaf al-qudoom, staying overnight in Mina the night before ‘Arafah, idtibaa‘ [uncovering the right shoulder from the beginning of tawaaf until the end, by placing the middle of the rida’ (upper garment) beneath the right armpit and the ends of the rida’ over the left shoulder], walking at a rapid pace [when doing so is recommended], kissing the Black Stone, reciting the adhkaar and du‘aa’s, and climbing as-Safa and al-Marwah.
The essential parts of ‘umrah are three: ihram, tawaaf and sa‘i.
The obligatory parts are two: shaving the head or cutting the hair, and entering ihram from the miqaat. End quote.
The difference between an essential part, an obligatory action and a Sunnah action is that Hajj is not valid without an essential part, whereas if an obligatory act is omitted, Hajj is still valid, but the one who omits it must offer a compensatory sacrifice (a sheep), according to the majority of scholars. As for Sunnah actions, the one who omits them does not have to do anything.
Please see ash-Sharh al-Mumti‘ (7/380-410) for evidence to prove these essential parts, obligatory acts and Sunnahs, and the rulings having to do with them.
And Allah knows best.