It is a patronymic surname, meaning it is derived from a given name. In this case, it comes from the given name "Castaño," which means "chestnut" in Spanish. This name was likely given to someone with chestnut-colored hair or skin, or who lived near a chestnut tree.
The surname Castañeda is common in Spain, particularly in the regions of Andalusia, Castile, and Extremadura. It is also found in Latin America, where it was brought by Spanish colonists.