There are various ways of calculating this quantity (and therefore various ways of misleading the people who use this ratio). The most primitive method is to look at the current stock price of a company and then divide it by the most recently reported earnings per share, a quantity that should show up in the financial statements of a corporation.
Another way of calculating this is to use analysts best estimates for the future earnings per share. This can be confusing, especially since some news services do not actually specify where the earnings per share value used comes from.
What are the disadvantages of these two methods? The first one is the tendency of management to inflate the earnings per share value reported, especially when management compensation comes from stock options. Meeting or beating analysts predictions is one way of encouraging the increase of the stock price. I've read of many such cases in the US; every time there's news of an earnings restatement, I wonder about the auditors and the management. The most famous example of earnings statement manipulation is Enron.
The second disadvantage lies in analysts being human. Precise figures are produced without error bars just looks like black magic. Any prediction about the future will contain uncertainty, and the error bars get larger as the length of time involved increases. Weather prediction, for example, gives only a week or so. Typhoon paths for example, contain error bars, and the error bars increase with time. I've read studies of analyst accuracy, and they don;t make a good showing.
One way of getting around the uncertainty of past year earning estimates is to take a time average, for example, over ten years (suitably indexed to take inflation to account), and then use this average earning per share to calculate P/E. The problem, of course, is how representative this average is of present or future earnings.
One case where this average seems to be useful is for the stock market as a whole. Shiller, in Irrational Exuberance, uses this ratio for the S and P index to check whether the market as a whole is overpriced. The claim is that "normal" levels would be at around 15, and numbers above this mean the market is overpriced.
I sometimes calculate the inverse of the P/E ratio as a way of comparing the return on investment on a stock to that of a bond. If you divide 100 by the P/E, then you have an estimate on the return on investment, assuming you just bought the stock at that price. 15 means a return of around 6.8 percent, slightly better than the current return on BBB bonds which is, as of writing, at around 4 percent per annum. This number of course is most meaningful if you take the perspective of the controlling shareholder, assuming you bought control at that price.
One should not read too much into the P/E ratio. There are other ratios that Graham and Dodd suggests as a way of measuring the health and return of a corporation, e.g. Total Earnings to Current Assets, etc. One ratio that I'm partial to (if only getting that information for free is so damned difficult) is the Price to Corporate Income Tax per share ratio, since it gives similar information as the P/E but this time, based on actual taxable income. Alas, like all financial ratios, it is also possible to game.