Though popularly considered American, the traditional cowboy began with the Spanish tradition, which evolved further in what today is Mexico and the Southwestern United States into the vaquero of northern Mexico.
As English-speaking traders and settlers expanded westward, English and Spanish traditions, language and culture merged.
California, on the other hand, did not see a large influx of settlers from the United States until after the Mexican–American War. In slightly different ways, both areas contributed to the evolution of the iconic American cowboy. Particularly with the arrival of railroads and an increased demand for beef in the wake of the American Civil War, older traditions combined with the need to drive cattle from the ranches where they were raised to the nearest railheads, often hundreds of miles away.
A large number of horses were needed for a roundup. Each cowboy would require three to four fresh horses in the course of a day's work. Horses themselves were also rounded up. It was common practice in the west for young foals to be born of tame mares, but allowed to grow up "wild" in a semi-feral state on the open range.
American cowboys were drawn from multiple sources. By the late 1860s, following the American Civil War and the expansion of the cattle industry, former soldiers from both the Union and Confederacy came west, seeking work, as did large numbers of restless white men in general. A significant number of African-American freedmen also were drawn to cowboy life, in part because there was not quite as much racial discrimination in the West as in other areas of American society at the time.
As the frontier ended, the cowboy life came to be highly romanticized. Exhibitions such as those of Buffalo Bill Cody's Wild West Show helped to popularize the image of the cowboy as an idealized representative of the tradition of chivalry.