Linguistically, I’tikaaf means to isolate oneself in a place or devote oneself to an act whether it is good or bad. Religiously, it means a person stays in the masjid obeying Allah for a specific time period. But is it a Sunnah?
Itikaf is a Sunnah according to the consensus of the scholars from Ahulus Sunnah.
However if a person vows to perform Itikaf then he must do so according to Ibn Munthur.