I would say to pull and check/clean the Idle Air Control motor. That would normally open just a little bit to advance the idle to keep the truck from stalling under the load of the A/C unit. Throttle body cleaner @ $3/can will do the trick. However, this is shooting blind from the hip - we do need to know the year and engine type to help pinpoint the problem. The A/C system may also be overcharged. The system can be checked with a $24 refill kit that includes a tap valve, hose with a gague on it and a can of blended refrigerant, PAG oil and system cleaner/booster. Look for the blue label "Interdynamics" kit if you can. Walmart and Autozone carry the product and the TB cleaner.