Markets are places, real or virtual, where consumers and producers come together to trade. In theory, the trades make both sides better off, though not necessarily to the same extent.
Markets coordinate people's desire for "stuff" with producers' ability to make "stuff," but importantly with no one being in charge of the process. The only thing you need is that both sides respond to a price signal. That's it.
Microeconomists say that markets are equilibrium-seeking, which means that trading in a market ultimately leads to a point where as much is supplied as consumers demand (and no more or less). The concept of equilibrium is much used in microeconomics, especially in the supply and demand model. This model looks at partial equilibrium or an equilibrium in one given market (for example, the market for canned tuna, or the market for books). You also want to understand how a partial equilibrium is related to the following:
Nash equilibrium: A point where two people or entities are competing for something and arrive separately at a point where no one has an incentive to change their behavior.
General equilibrium: An equilibrium state exists across a whole economy given certain conditions. This is used for the analysis of welfare.
Of course, reality can get very complicated, and there are situations where someone — often government, but sometimes private monopolists or property owners — wants to control the price, which is often not desirable. Take rent control, for example. Introduce too low a maximum rent, and more people will want to rent than there are people who are willing to put their house up for rent. As a result, setting a rent control at a very low level just creates homelessness — more people trying to rent, but landlords withdrawing their properties from the market because the price is too low for them to bother.
What if you set the rents too high? Well, if the maximum rent is above the equilibrium in the market, landlords are more willing to rent at that price and so more enter the market. But fewer renters are willing to rent at that price, so the result is an excess supply of rentable properties. As a result, some landlords drop out — those that need the highest level of rent to make a profit — and the price falls until it reaches market equilibrium.
Controlling prices can have other consequences, too. The price isn't just an absolute number — say, a price of $5 — it's also a relative measure. For example, a car costs far more in terms of other things you can do with your money than a sofa does. The model of consumer behavior eventually tells you that the relative price of goods encapsulates what consumers value. When you affect the relative price, you affect choices everywhere. That's one reason why economists prefer almost any intervention to one that affects relative prices.
Markets are themselves complex things in reality and vary widely from type to type. For example, financial markets are different from labor markets in their scope, participants, and trading outcomes. Microeconomists look at all these types of markets, starting with the simplest model, and then try to incorporate distinctive differences in these markets into the models.
The great economist Alfred Marshall was the first to make a key point, though: A big difference exists between the practical results of markets in reality and the simulation that economists use, which he called The Market. When you encounter a type of market you don't understand, starting to analyze it using the simulation is a good starting point. If you know more about the market, you will see the limitations of a simple simulation.