Still not exactly a lot of information to go on. From what you've said so far, it could be literally anything. Fuel injectors, throttle body, ignition, computer, O2 sensors...
We don't even know which engine you've got. What codes are throwing? I'm sure people would like to help you figure this out, but you gotta give us something to work with...