2001 Nissan Altima

If i dont constantly keep my foot on the gas pedal then my car will die.

This is usually a sign that there’s a problem with the Idle Air Control circuit. It could be as simple as removing the Idle Air Control valve, and cleaning it along with the idle air bleed port on the throttle body with throttle body cleaner, and then reinstall the Idle Air Control valve. Or, the problem might be with a defective Idle Air Control valve itself.