Once you see it, you can’t unsee it. The pope’s skull cap looks like a pumpkin, and that’s how it got its name.
The zucchetto, the close-fitting skullcap worn by the pope and other members of the Catholic clergy, is named for its resemblance to the top half of a pumpkin.
Literally translated to “little pumpkin” from Italian, the zuchetto’s original use was practical – it derived from the felt skullcap known as the pileolus meant to keep clerics’ heads warm in the cold, stone churches and monasteries of the Middle Ages. Once 16th-century Spanish explorers brought pumpkins and other squashes to Europe from Mexico, where they originated, the nickname was inevitable.
Pope Paul VI made the zucchetto obligatory for members of the Church hierarchy in 1968, but all other clerics may wear one. What color one wears depends on one’s rank:
White: The pope
Scarlet: Cardinals
Amaranth Red: Patriarchs, archbishops and bishops
Black: Lower clergy
The zucchetto is worn and removed at different times according to these circumstances:
When the zucchetto is worn it is worn outdoors, indoors and, if a bishop, in the liturgy. Other clerics are supposed to leave them in the sacristy. Within the liturgy if the prelate is not celebrating it is removed briefly when reverencing the altar. It is removed at the Sanctus and restored before the Our Father, during which it is worn. Noonan notes that some prelates have started removing them during the Gospel and Our Father, but this is against long-standing custom and law. The zucchetto is removed in the presence of the exposed Blessed Sacrament, in procession of the Blessed Sacrament and during veneration of, or blessing with, a relic of the True Cross. They are also removed in the presence of the Holy Father, except during the liturgy, when it is worn as previously stated. However, it is briefly removed as a reverential acknowledgement when addressing the Holy Father or referring to him in a liturgical or other public discourse at which he is present. (EWTN)
Apparently, zucchettos are quite popular with children as you will see in the cute video below. (It was not the first amusing zucchetto incident in St. Peter's Square.)