Insider trading happens when someone buys or sells shares of a company using confidential information that the general public doesn't know yet. This gives them an unfair advantage and is illegal because it violates the principles of fairness in the stock market.