Talked with an SEC guy at a conference one time, they have access to every order that touches any American exchange (filled or not) in a huge data warehouse, apparently most of this detection is just a series of SQL queries.
insiders are required to report their trades (search for "sec Edgar").
it is hard to make money knowing that a trade has taken place.. you need to know BEFORE and this is clearly illegal with very serious penalties (martha stewart served jail time...).