Hammertoe is a deformity affecting the second, third, or fourth toe, characterized by a bending at the middle joint. This condition arises from an imbalance in the muscles and ligaments that maintain the toe's alignment. In some cases, wearing shoes that are too small or narrow can also contribute to the development of hammertoe.