- you trade on information that is material and nonpublic, and
- some other stuff.
The other stuff is mostly stuff that only a lawyer could love, but man do they love it. It consists most importantly of the rule that the person who gives you the material nonpublic information needs to have done so in breach of some duty to keep the information secret and in order to get some personal benefit for himself. If a stranger just wanders up to you and says “I’m the CEO of Smerbafife and it’s a giant fraud, gotta go,” and you trade on that: you’re probably good.