A type of market that specializes in trading stocks (financial assets that represent shares of ownership in a company). By extension, the stock exchange has come to be a trading place for most securities (financial assets such as stocks and bonds) and even currencies, commodities, and the like. The origin of the stock exchange can be traced back to informal meetings of 18th century commission agents and brokers.
Much like your local grocery store, the stock exchange relies on the Supply and Demand theory, which states that prices are affected by the relative availability (supply/demand ratio) of trade objects. Capitalism, defined as an economic system based on private ownership of resources and where those resources can be freely bought and sold, relies heavily on the existence of a public stock exchange.
The general working principle of a stock exchange is for market makers to buy and sell a certain amount of securities at an announced price, and for stockbrokers to act as commission-based agents for third parties willing to buy or sell those securities. Each stock exchange (NYSE, London Stock Exchange, etc.) has its own policies, with the British system allowing market makers to act as brokers as well.
In modern economies, the stock exchange plays the essential role of allowing private companies to raise cash by initially selling shares of ownership. Once these stocks have hit the market, though, they no longer belong to the issuing company: further trading of these stocks will not bring any further cash to the parent company (much like your local grocery store has taken ownership of the goods it sells, and does not pay any further fee to the manufacturer for each retail sale).
While most stock exchanges are primarily geocentered (New York, London, Paris, Tokyo, etc.), many are specialized in a specific type of security (i.e. the technology-oriented Nasdaq).
The reported NYSE record dollar trading value was set in 2000 with 11,060.0 billion dollars traded (http://www.nyse.com/pdfs/2001_factbook_02.pdf). That's even bigger than the US Gross Domestic Product for the same year (10,027.9 billion dollars).