Could be many factors, but assuming car is in otherwise maintained condition, suspect bad fuel filter.
idle control sencor
You are flooding the engine with fuel when you step down the pedal, and that stalls the engine. This is probably because your car timing is behind. A good tune-up and adjusting your ignition timing will solve this problem.
If the engine is running it is burning fuel, whether the gas pedal is pressed or not.
If your engine has a carburetor, a small amount of fuel will be sprayed in to the intake manifold when accelerator is depressed, and engine isn't running. This is fuel stored in the accelerator pump reservoir to prevent hesitation. So if the engine isn't running, it will spray the first time accelerator pedal is pressed and it won't introduce additional fuel no matter how many times you press the gas pedal after the first press. The engine needs to be running for the accelerator pump well to refill. If your asking because you're wondering if pressing the gas pedal will flood the engine making it hard to start, the answer is No, it won't flood the engine. If your engine does not have a carburetor, then it's fuel injected. No fuel at all will enter the engine with the gas pedal pressed, engine not running. The engine has to be cranking (starter engaged to start engine) for the fuel system to operate. 0 chance of fuel if the engine is not cranking or running to activate fuel injection.
Brake system has air in it.
Try putting the pedal to the floor while cranking it
Check the proportioning valve.
If a 2006 Nissan Sentra 1.8 Liter will not accelerate by stepping on the gas pedal, it is probably a compression problem. Check the MAP (Manifold Actual Pressure) Sensor. This sensor is responsible for letting the computer know how much pressure is in the manifold when the engine is running. Also check the EFI (Electronic Fuel Injector) or carburetor and the Speed Sensor.
Posible air in the brake line system. The behavior you described is normal operation. The brake cylinder is power assisted by engine vacuum. When the engine is off you don't have vacuum or the power assist. When the engine is started, the pedal will immediately soften up as the vacuum comes online.
Most automatics require you to depress the brake pedal.
Pedal pumps up fine, but when you run the engine, the brake booster applies more force to the lines. Thus compressing any air that may be in there. You will need to bleed the brakes more. I sometimes bleed the brakes with the engine running to correct this.
Throttle body has excess carbon build up or bad idle air control motor. Clean throttle body and/or test and replace AIC motor.