Any of these or any 2 of these or all at once. 1) You run out of gas or fuel. 2) A pipe leak from the tank. 3) The fuel pump stops working because of a blockage or mechanical failure.
There are many reasons as to why a car may lose power while driving. However, the most likely cause is a bad fuel pump. This causes the car to 'think' that there is not any gas, so it begins to stall, and eventually stalls while driving.
Out of gas
It can be related to gas and electrical power.
Carburator problems -- dirty gas -- water in gas
possibly cam sensor
Alot of things.. bad gas.. No gas.. Engine is dead.. etc.
Failed fuel pump.
Poor Maintenance, Ran out of gas, clogged engine
Because of friction
The question is vague but I know a Mass Airflow Sensor issue causes the car to stall out when the gas pedal is applied like it has no power when in gear. The car may idle okay, I've even seen my friend pump the gas while it's in gear and gets the car moving but while the pedal is held down and the clutch is out the car will die.
you buy a new car!
Contaminated gas or the wrong type of fuel for the vehicle.