With the limited information you've provided, I assume it's a diesel engine, and this malfunction typically occurs when there are problems with the mass airflow sensor (MAF) or the EGR valve. It's not a hard and fast rule, but it's the most common cause. First, I would check the condition of the MAF sensor. It's a very delicate component because it operates using a very fine filament, so you must proceed with extreme care during disassembly, cleaning (though not recommended), and reassembly. If you haven't already, change the air filter, as it affects the lifespan and proper functioning of the MAF sensor. The other thing to check is the EGR valve, which also tends to get very dirty due to its function of recirculating exhaust gases into the intake. The procedure is almost the same: disassemble and clean it. There are also EGR valve cleaning sprays available, although I doubt their effectiveness.