As the previous post explained, free markets work as well as they do because of the price signals. But there are two major ways that price signals can be interfered with and distorted, always to the detriment of the market.
Producers can distort the price signals (to their advantage) by various means. They can form cartels, in which all producers conspire together to hold the supply lower (and hence the price higher) than it would naturally be were free competition allowed. The OPEC oil producers have tried to do this for years, but with only modest success because the temptation for individual members to cheat is high. The DeBeers Combine managed to inflate the price of diamonds for years this way, though eventually new fields in Russia that they could not control broke their hold on the market.
Producers can also indulge in predatory pricing wars, in which they sell a product at a loss (covered by profits in other areas) for a while, trying to drive their competitors out of the market, after which they can raise prices and hence profits because there is less (or no) competition left.
Governments can also interfere with the price signals, and often do for political or ideological reasons. For example, they can offer producers subsidies (or grants, or tax breaks), making it profitable to allocate capital and labor to an area which would otherwise not be profitable. Corn ethanol is currently subsidized that way, primarily as a sop (vote getter) to farmers in the Midwest corn belt. Without the subsidies, corn ethanol is non-competitive as a fuel. Similarly passenger train service is subsidized in the US, because it is inherently unprofitable (trains are very efficient at hauling bulk materials like grain or coal or tightly packed containers, and very inefficient at hauling passengers).
Government can also distort market price signals by restricting competition among producers. For example, tariffs (extra taxes on imported goods) make foreign producers less competitive, so that local producers can charge more and make a higher profit. Of course there is no free lunch – those higher profits come out of the pockets of the consumers, who are in effect being forced to subsidize the producers.
In general, all interference with market price signals, whether by producers or the government, makes the market less efficient. Nevertheless, governments in particular like to interfere to favor (politically powerful) constituents, or to advance ideological goals that are not themselves inherently supported by the market forces. For example, many authoritarian governments around the world subsidize food and fuel as a way to try to keep their populations docile. In general, the more they do this, the worse their domestic production of food and fuel becomes, and hence the more it costs them to continue to subsidize it.
The same rules apply to labor. Under normal free market circumstances, market forces determine labor wages. Skills and/or experience in short supply with high demand can command higher wages than more common skills and experience. That encourages (rational) workers to acquire the skills and experience that are more in demand. If one is an expert in making buggy whips in a world that doesn’t need buggy whips, there is a natural incentive to learn another trade, one more in demand.
Unions and minimum wage laws are both mechanisms that interfere with the free market price signals for labor, usually with results not helpful to the laborers. Unions drove American steel companies out of business in the middle of the last century, pricing the labor (and hence the finished steel) above what the world market would accept. And unions almost managed the same feat with American auto makers (though the auto maker management helped with some poor management decisions). And minimum wage laws have simply made some jobs go away, automated or shipped offshore, because some workers are simply not worth the minimum wage. (A general rule: a worker has to make more profit for the company than they cost, or there is no point in hiring them. Despite what Congress thinks, companies don’t exist to make jobs for people – they exist to make a profit for their investors.)