A market economy is, strictly speaking, an economy in which prices of things are freely set based on the laws of supply and demand, unfettered by interference from a government or other outside body. It is, at its most basic, an economy run entirely by the market itself. In the real world, however, there is no such thing as a truly unfettered economy, and so the term is used to describe economies which are largely dictated by market forces. As a result, whether or not a given economy is actually a market economy can be open to some debate.
A market economy can be contrasted by a command economy, where the prices for things are set by a force outside the market, such as a government. Strict Communist economies, for example, do not allow the market to dictate prices, making them command economies. In recent years, however, many Communist states have begun incorporating aspects of a market economy into their systems. China is a good example of this model, often called market socialism or the socialist market economy. Under market socialism, many key industries are actually owned and operated by the government rather than private industry, but the government allows the prices of goods and services to fluctuate based on the market, rather than using their monopoly to set the prices as they choose.
A related type of economy is known as Anarcho-capitalism, in which all government interference in the market is removed entirely. Under Anarcho-capitalism all involvement in larger projects, such as defense spending or infrastructure, is on a voluntary basis. The government does not regulate any sales or ownership in any way, shape, or form, and the market is regulated only to the extent that individuals choose to limit their own actions. This has a great deal in common with the ideal, strictly laissez-faire economy, but is markedly different in its rejection of all apparatuses of the state as a necessary pre-condition to a truly free market.
Most economies in the West are defined as mixed economies, incorporating some elements of a socialist command economy and some elements of a market economy. These economies can be seen as falling along a spectrum, with varying degrees of market freedom. The United States, for example, can be seen as falling fairly far on the side of a true market economy, with steady deregulation of industries and privatization of even once government-owned industries. In contrast, many nations in Western Europe can be seen as falling more on the socialized end of the spectrum, with fairly substantial regulation of industries, and government ownership of some key businesses, such as prisons, water systems, telecommunications systems, health-care systems, and others.
The idea of the market economy is intricately connected with larger political ideals as well. Many theorists, most notably Milton Friedman, one of the great proponents of this type of economy, have posited that a free economy is a necessary pre-condition for a truly free political system. They hold that the degree to which a nation embraces a free market correlates over time to the degree to which that nation will provide civil and political freedoms to its citizens, with command economies eventually stripping away individual rights.