In a perfect world, a stock would start to rise right after you bought it. You'd get the lowest purchase price possible and then see an instant return on investment.
This is very hard to do, though, because you have to make predictions about the future. Everyone is supposed to have access to the same public information about companies and stocks, and they can only trade based on that information. If you know something, everyone else can, in theory, know it too.
To get around it, some people look for tips for the inside. They try to find information that isn't open to the public and make their trades that way, buying or selling stock before the public can react.
For instance, a person who works for a company may know that reports coming out in a month about earnings and a future merger will vault that company's stock far higher than it has ever been. That person is on the board and gets this information long before it makes its way out of the boardroom.
He or she then passes that information on to a close friend or a family member, who uses it to buy stock before the reports come out. When they do and the stock soars, that person earns a lot of money -- and then gives a kickback to the person who tipped them off.
In that type of situation, both people could be accused of insider trading. The trader took information they were not even supposed to have and gained an unfair advantage.
You can imagine how people could break these laws accidentally, just thinking they're helping out a friend. Those who find themselves facing serious charges need to know what defense options they have.