Insider trading is the practice of buying or selling shares of a company's stock (or some other security) based on knowledge that was acquired by an insider as an officer of the company, and that is not available to the general public. Such use of this knowledge is illegal because it gives an unfair advantage to one set of investors.
To avoid charges of insider trading, insiders usually cannot trade their company's stock on the basis of major news until the news has been made public. The traditional definition of public is appearance on the Dow Jones broad ticker.
The Securities and Exchange Commission is in charge of making sure market participants are playing by the rules. Company "insiders" aren't the only ones who can be charged with insider trading. A friend or relative who gets tipped off by the CEO to an impending bankruptcy filing, and trades on this information, could be guilty. Other people who come in contact with private information, whether or not they work for the company, are also prevented from trading based on that information, even if knowing it by itself is not illegal.
Insider trading is also a more general term that includes legal buying and selling by insiders. Insiders can't be shut out of trading their own stock, and their trading is legal as long as they are on a level playing field with everyone else.
Many investors watch the trades insiders are making -- which are filed on Form 4 with the SEC -- as one measure of whether a company is headed up or down. Conventional wisdom holds that if insiders (who know the company best and presumably want to profit from it) buy, that's a signal of a strength. Conversely, if insiders are selling, that might be a signal of weakness.
However, buying and selling by insiders could have nothing to do with their company's health. Maybe there are tax reasons, maybe the insider needs a large sum of money for something personal, maybe the CEO sells shares but retains options.
As Fool fave Peter Lynch once said: "Insiders might sell their shares for any number of reasons, but they buy them for only one: They think the price will rise."