Sickle cells form due to a genetic mutation in the HBB gene, which codes for the beta-globin subunit of hemoglobin. This mutation leads to the production of an abnormal version of hemoglobin called Hemoglobin S (HbS). When HbS releases oxygen, it can stick together and form rigid structures, causing the red blood cells to assume a sickle shape.