Markets allocate resources in a variety of ways, depending on the type of market in question; in a free market, demand is dictated by the consumer and how the supply is handled by the producer while in a command market, resources are allocated by the government and taxes are paid for new programs for education or safety. A third type of market is a mixed market with a private sector that dictates demand for computers, phones or televisions and a command market that is responsible for roads, security or infrastructures related to public well-being, as explained by Investopedia.
In a free market, resources are allocated by supply and demand, the scarcity of resources and where consumers spend money. If people spend more money on electronics than books, the supply for the first will rise while the latter will diminish, as suggested by Economy Watch.
While capitalism is considered to be a free market, in part it is considered to be a mixed market because the government steps in to assure that the price for a specific resource is free market value, monopolies are subject to government intervention and the banking industry has to follow strict standards created outside of the balance between supply and demand.