First, for an engine to run 4 things are needed:
1. Fuel.
2. Air
3. Spark
4. Compression
Now on to number 2, air. Usually the problem is the engine measuring the wrong amount of air, which could be a sensor (others mentioned the MAF) or it could be due to a vacuum leak, which may not cause an engine code. I would check the following:
Check air filter for clogging
Visually inspect the vacuum lines, particularly those connected to the throttle body, valve cover(front of engine) and PCV valve(near the power steering pump I think?). Look for any vacuum lines that are disconnected or damaged. Wiggle them and see if that effects the rough running.
Check to see if the intake manifold or valve covers show signs of significant oil leakage. If you have a bad enough leak in these gaskets it could cause vacuum problems. (slight oil leaking doesn't mean you have a vacuum problem)
Let me diverge and talk about the positive crankcase Vacuum (PCV) system for a sec (disclaimer i am not an expert, just my basic understanding of it). The PCV system uses engine vacuum to pull a steady vacuum on the crankcase. This is to capture very very small bits of unburned hydrocarbons that inevitably slip past the piston rings during compression and bring them back through the intake to be reused rather than building up in the crankcase. If you have a bad PCV valve or a bad enough vacuum leak somewhere either in the hoses or gaskets, it will pull air into the intake that has not been measured by the MAF. If bad enough this can cause poor running. Another indication that you have a bad PCV leak is if you pull the intake hose off the throttle body and see that the throttle body is very oily. It may be dirty but shouldn't be oily. What happens is if everything is sealed up properly there is very little actual air flow. But if you have a leak, now you have air flow from that leak. If it is bad enough, it will drag oil mist from the crankcase up into the intake.
The other thing to check is the idle air control valve (IAC). this regulates the flow of air at idle to ensure proper RPM and smooth running. If it smooths out when you press the gas it could be a bad IAC.
One other thing to mention is that it is entirely possible that a rough running problem is a combination of things. Maybe you need new plugs and wires AND need to clean the MAF sensor for example. This is just kind of my general methodology of what to check.