The gyri are part of a network of folds and ridges, that give the human and other mammalian brains more surface area.
The brain's size is limited because it is enclosed within the skull.
Folds are created by ridges and depressions, which allow a bigger cortical surface area and greater cognitive function within the limits of a smaller cranium.
During prenatal and neonatal development, the human brain goes through gyrification.