Ingrown toenails occur when the edge or corner of a toenail grows into the surrounding skin, causing pain, redness, swelling, and, in some cases, infection. This condition is most commonly seen in the big toe but can affect any toe. Ingrown toenails can develop due to various factors, including inappropriate nail trimming, tight footwear, and injury to the toe.