If your vehicle is showing vehicle only stays running if you keep your foot slightly on the gas pedal, here are the most likely causes and the parts you'll need to fix each one.
If the battery was recently disconnected or died, the engine computer loses its learned idle settings. If the throttle body has carbon buildup, the factory default settings won't allow enough air to bypass the throttle plate, causing a stall unless you press the pedal.
On vehicles with a physical throttle cable, the IAC valve manages the air needed to keep the engine idling. If it gets clogged with carbon or the internal motor fails, the engine will choke out the moment you take your foot off the gas.
A cracked hose or leaking intake gasket allows unmetered air into the engine, creating a lean condition that the computer cannot compensate for at low RPMs. Giving it gas manually forces enough fuel and air into the engine to keep it running.
The MAF sensor measures the amount of air entering the engine. If the sensor wire is dirty or failing, it severely miscalculates airflow at idle speeds, causing the engine to stall out.
The Exhaust Gas Recirculation (EGR) valve is supposed to be closed at idle. If carbon buildup causes it to stick open, exhaust gases will flood the intake manifold and literally suffocate the engine at low RPMs.
VVT solenoids adjust engine timing using oil pressure. If dirty oil causes a solenoid to stick, the camshaft timing will remain in a high-RPM position, which makes the engine run incredibly rough and stall at idle.