How exactly does the black market affect a country's economy? Disclaimer: I'm far from an expert on economics. I apologize if the question seems poorly asked or not clear.



Take for example the drug trafficking business and cartels in the past. It seems to me that the production cost of illegal drug substances was quite low. Most of the usual substances back then were either a form of plant or extracted from certain kinds of plants. 

In contrast, the demand of those substances was tremendous, mostly because of their unusual properties and effects on the human body.

How this low production cost - enormously high demand combo affected the economy of the countries where drug trafficking was taking place?
I think the question is extremely broad. The effects of drug dealing on the whole economy depend on many things, for example, on how strict is the country at enforcing the ban, how violent the drug dealers are, and what is done with the profits. The experiences in Mexico and Colombia, for example, are substantially different. While many drug lords have developed complete cities from the gains from trafficking, others have simply wasted it all. In most cases, the government is involved in the trafficking (via corruption) so it can have some positive effects in terms of govt budget, but if it becomes violent, the costs are clear. 

If there is any generality I would say that the combo of low cost and huge demand makes it really hard to prohibit. There are a few studies trying to measure the economic effect of the violence of drug dealing, but any empirical work is limited due to the lack of reliable data on basically every aspect of illegal markets.