LONDON -- Whenever news emerges about a company -- or its products, its markets, and even unrelated things like wars in distant countries -- the stock market decides how this will affect the company's future earnings.

As the new information is assimilated, investors' collective opinion of the company's prospects will manifest itself in the form of a new share price. Now and again this happens in a peculiar way.

News affects other prices
Sometimes company-specific news will produce a knock-on effect on other companies' shares. This happened last Thursday when the world's second-largest brewer, SABMiller (LSE: SAB.L), reported better-than-expected sales growth in its first-quarter management statement, causing its shares to rise by 3.3% in half an hour.

Over the same period, shares in the world's largest distiller, Diageo (LSE: DGE.L), rose by almost 2%, mostly because SAB's report told the market that alcohol sales in emerging-market nations are continuing to grow strongly. While Diageo doesn't have anything like the same presence in these countries, it still does a fair bit of business there. Consequently, the market marked up Diageo's shares on the SABMiller news.

So if anything new is released about the LIBOR scandal that is specific to Barclays (LSE: BARC.L), you can be pretty sure that it will influence the share prices of the other banks that are also believed to be involved, such as HSBC.

Good news? Bad news? It doesn't matter
Often news has little or no effect because it has already been priced into the shares. Sometimes you'll see a company produce a good set of results, only for its share price to fall. When this happens, it's because the market was expecting even better results.

When markets react in strange ways to news, it can be a little bit disconcerting if you're a newcomer to the stock market. If you want to learn more about shares but aren't quite sure where to start, you might try downloading our special guide: "What Every New Investor Needs To Know." The report is currently available as a free download, but hurry -- it is available for a limited time only.

Bailout? That's last year's news
Last year, the news that Spain would probably need a bailout would have caused global stock markets to tumble. In 2012, the same news produced a collective "So what?" and the FTSE 100 index fell by just more than 1%.

The news didn't have much of an effect because global financial markets seem to have become used to the eurozone's problems, and some form of bailout was already built into prices.

But when Mario Draghi, president of the European Central Bank, said last week that it would do "whatever it takes" to support the euro, the fact that share and bond prices around the world rose sharply tells us that this was genuinely new news.

Oils, pharmaceuticals, banks, telecoms -- just where should you invest today? "Top Sectors for 2012" is The Motley Fool's latest guide to help Britain invest. Better. The report is free. Click here for your free copy.

Further Motley Fool investment opportunities: