The Spanish invented what we now consider the cowboy tradition, beginning in the Middle Ages in Spain. During the 16th century, they brought the tradition and their horses, the ancestors of the wild mustangs, with them to the New World through New Spain (later Mexico).
Though popularly considered as an American icon, cowboys are a New Hispanic tradition, which originated in the Central States of Mexico, Jalisco and Michoacan, where the Mexican cowboy would eventually be known as a "charro". Historically, the northern parts of Mexico (New Mexico)originally included most of the territory of the American southwest including Texas. In the early 1600s, Spain, and later Mexico, began offering empresario grants in what would later be Texas to Americans who agreed to become citizens and convert to Catholicism. In 1821 Stephen F. Austin and his East Coast comrades became the first English speaking Mexicans. Following Texas independence in 1836 even more Americans immigrated into Texas and to the empresario ranching areas. Here they were absorbed by the Mexican vaquero culture, borrowing vocabulary and attire from their counterparts.
The buckaroo, also a cowboy of the vaquero tradition, developed in California and bordering territories during the Spanish Colonial period. Buckaroo is the anglicized pronunciation (originally bakhara (1827), influenced by 'buck') of vaquero and is still a common term in the Great Basin and many areas of California and the Pacific Northwest. Following the Civil War, their culture diffused eastward and northward combining with the earlier cowboy tradition that was following the cattle trails out of Texas northward and westward. Sharing the same base, their traditions became indistinguishable with a few regional differences still remaining.
Much has been written about the racial mix of the cowboys in the West, but cowboys ranked low in the social structure of the period and there are no firm figures. The Cattle on a Thousand Hills by John Ambulo in the March 1887 issue of The Overland Monthly states that cowboys are "... of two classes—those recruited from Texas and other States on the eastern slope; and Mexicans, from the south-western region. ...". Census records bear that out. The cowboy occupation undoubtably appealed to the freedmen following the Civil War. It is estimated that about 15% of all cowboys were of African ancestry—ranging from about 25% on the trail drives out of Texas, to very few on the northern ranges. Similarly, cowboys of Mexican descent also averaged about 15%, but were more common in Texas and the southwest. American Indians also found employment as cowboys early in the history of the West. Many of the early vaqueros were Indians trained to work for the Spanish missions in caring for the mission herds. Following the dissolution of the reservation system around 1900, many of the Indian trade schools also taught ranching skills to Indian youth.
http://en.wikipedia.org/wiki/Cowboys