Securities laws in the United States prohibit trades made with "material non-public information". A 10b5-1 plan is an affirmative defense to insider trading. The basic idea is that before you get access to material non-public information, you decide "I want to buy/sell X shares on the second Tuesday of every month" or similar. Because the trades are made in a way that was determined before you had access to material non-public information, this is not considered insider trading.
(IANAL, this is not legal advice, etc etc)