A Market economy (also called a free market economy) is an economic system in which the production and distribution of goods and services takes place through the mechanism of free markets guided by a free price system.
On the other hand, a Command economy is an economic system in which the state or government controls the factors of production and makes all decisions about their use and about the distribution of income.
There is another type of economy, known as Mixed economy. Mixed Economy is combination of free market and command economy.
In a free market economy individuals and firms make all the decisions on what to produce, and in what quantity, entirely in their own interest in order to produce maximum profits. Choosing what to produce comes mainly down to demand. The higher the demand for a certain product the high the price of that good can be pushed. This aids fast thinking, intelligent individuals as the faster the decision to produce a higher quantity of the good is made, the higher the profit margins can be. Examples of a free market, or as close to it as you can get, are Hong Kong and Singapore.
In a Command system decision making is controlled completely by the government. It allocates how all the resources are utilised and turned into outputs, and does so in a socially desirable manner. This requires a careful balancing between output goals and available resources. Resources are al1ocated through a planning process. At its most extreme, this means that the state will direct labor into jobs as well as directing consumers what to consume, although it is more likely that they will direct producers what to produce, therefore determining the choice of goods available to consumers. An example of a command economy was the USSR when under the control of Stain.
In reality and the modern world there are actually no free markets, or command economies, only mixed economies. However, the level of how much of a mixed economy a state employs does vary significantly.