Insider trading is the buying or selling of a publicly traded company's stock by someone who has non-public, material information about that stock. It can be illegal or legal depending on when the insider makes the trade. It is illegal when the material information is still non-public. It can be legal as long as it conforms to the rules set forth by the SEC.