Legal insider transactions (executives buying or selling their own company's stock) are disclosed on Form 4 and are public. Illegal insider trading is using information the public does not have, such as a pending merger, to trade ahead of it.
Tipping others or trading on a tip is also illegal. Unusual options-chain activity before announcements draws sec attention.
Example: an employee learns of an upcoming acquisition and buys short-dated calls the day before the announcement. That trade is exactly what surveillance systems are built to find.
Related: sec, market-manipulation, options-chain