When people talk about market efficiency, they are referring to the degree to which the aggregate decisions of all market participants accurately reflect the value of public companies and their common shares at any given moment in time. This requires determining a company's intrinsic value and constantly updating those valuations as new information becomes known. The faster and more accurate the market is able to price securities, the more efficient it is said to be. (See also: What Is Market Efficiency?)
This principle is called the efficient market hypothesis (EMH), which asserts that the market is able to correctly price securities in a timely manner based on the latest information available. Based on this principle, there are no undervalued stocks to be had since every stock is always trading at a price equal to its intrinsic value. However, the theory has its detractors, who believe the market overreacts to economic changes, resulting in stocks becoming overpriced or underpriced, and they have their own historical data to back it up. (See also: Working Through The Efficient Market Hypothesis.)
For example, consider the boom (and subsequent bust) of the dot-com bubble in the late 1990s and early 2000s. Countless technology companies (many of which had not even turned a profit) were driven up to unreasonable price levels by an overly bullish market. It was a year or two before the bubble burst, or the market adjusted itself, which can be seen as evidence that the market is not entirely efficient, at least not all of the time. In fact, it is not uncommon for a given stock to experience an upward spike in a short period, only to fall back down again (sometimes even within the same trading day). Surely, these types of price movements do not entirely support the efficient market hypothesis.
The implication of EMH is that investors shouldn't be able to beat the market because all information that could predict performance is already built into the stock price. It is assumed that stock prices follow a random walk, meaning that they're determined by today's news rather than past stock price movements.
It is reasonable to conclude that the market is considerably efficient most of the time. However, history has proved that the market can overreact to new information (both positively and negatively). As an individual investor, the best thing you can do to ensure you pay an accurate price for your shares is to research a company before purchasing their stock, and analyze whether or not the market appears to be reasonable in its pricing. (See also: Understanding Investor Behavior.)