Well, there are a lot of possibilities, but your IAC would probably be the best one to start with. Tapping it lightly with a hammer may be enough to unstick it to verify that it is the problem. If it is, you may be able to clean it and get it to work for a while longer, but I would recommend replacing it. Does it run will while you are giving it the gas? If so, then the IAC remains a good suspect.
If it runs poorly even while giving it the gas, then your MAF could be bad or dirty, you could have an air leak somewhere (manifold or intake), or you could have the common problem of failing COPs (ignition coils).