A market is a place where supply for a particular good is able to meet demand for it. In the case of financial markets, the good in question is money.
In capital markets, supply agents are those with "positive savings capacity", i.e. mainly households (surprising as that may seem!), and businesses, although the latter generally prefer to reinvest profits or distribute dividends to shareholders. The demand side comes from governments, the modern welfare state having substantial cash requirements, or other companies. Such agents are said to have "financing requirements".
Far from being an abstract entity, often described as both irrational and all-powerful, capital markets are in fact a driving force in the economy since they are places where the fuel, money, is made available to propel the machine forward, in other words generate wealth.
This is the concept, but in practice of course the mechanism is a little more complex.
The first difficulty resides in the fact that an exchange actually needs to take place between agents with savings capacity and agents with financing requirements. For a market to function, it is not enough that a good and its supply and demand exist; agents also have to want to trade it! However, agents with savings capacity, mainly households it should be recalled, are generally deeply averse to risk. An aversion furthermore which can be justified by common sense. Any book on the stock market for budding investors will begin with a warning urging readers to only invest funds in the stock market that will not be needed in the near future. Consequently, the bulk of savings generated by households are held on deposit in demand accounts or savings accounts where money is immediately available.
In contrast, agents with financing needs, i.e. businesses, need to find long-term financing for development. The time horizon of agents with savings capacity is typically a few weeks (next pay day) to a few months (next tax payment date ...). The time horizon of agents with financing requirements is several years! This difference makes actual exchange in markets more complex.