Cocaine is a drug derived from the leaves of the South American coca plant. Like other plant-produced substances such as caffeine, the amount of cocaine present in the actual plant is relatively small, and historically it was used as a mild stimulant by native peoples. It was only after the advent of modern chemistry techniques that the molecule was isolated and purified into the form we recognize as a drug today. Cocaine was never restricted to a particular economic or social class, either in South America or in its refined form, and still enjoys broad public appeal (though illegal). Case in point: Coca-Cola originally contained, and was named after, its cocaine content.
In terms of its legal and medicinal history, cocaine is not terribly different from marijuana. It enjoyed popularity as a recreational and medicinal drug following its chemical isolation in the mid-1800s, and the United States has always been one of if not its most prolific users. Despite its popularity, it slowly garnered a negative reputation, particularly for the prevalence of its usage among those perceived as lower-class; its role as a stimulant was thought to encourage criminal activity and moral corruption. Whether or not this is true is, of course, difficult to prove a hundred years after the fact, but what is without question is cocaine's addictive properties, quite unlike other stimulants like caffeine. Drug enjoyment is one thing, but drug addiction has almost always been seen as a lamentable loss of self-control and an undesirable community element. Several members of the scientific and medical community, such as Sigmund Freud, experimented with cocaine (including on themselves) and quickly discovered its addictive nature, and began to rescind their earlier endorsements.
Thus cocaine rapidly fell out of favor at the state and local level until it was restricted and eventually made illegal at the federal level. Ironically, in contrast to its modern stereotype as a lenient haven for drug advocates, California was one of the first states to enact narcotics legislation, at least partially because it associated drug use with foreign immigrants, who were perceived as a social and economic menace.
Today, cocaine is still an enormously popular drug, and it is also possible for it to be used legally for medicinal purposes, although these cases are dwarfed by the amount of illegal use. This continued popularity, the development and distribution of crack cocaine, and the large amount of money associated with the drug trade has the effect of enhancing cocaine's reputation as a recreational drug rather than a medicinal one.
The predominant conflict over cocaine today regards its illegality and who profits from it. As the United States is its primary consumer, a significant industry has grown around smuggling it into the US, garnering billions of dollars a year. The primary benefactors of this trade are Latin American drug cartels. Cocaine is primarily grown in three countries; Peru, Bolivia and Colombia. These countries ostensibly oppose smuggling or illegal use, but in practice have not been able to consistently enforce their laws, and at least partially rely on American anti-drug programs for funding and action. Additionally, the money associated with the drug creates a strong, corrupting lure, and on various occasions government officials have been shown to be colluding in the smuggling operations.