My car first ran out of gas at a quarter tank of gas. A few weeks later it ran out at half a tank. Then it started dieing while driving down the road and now it won't start at all. It will turn over and sometimes try to start but won't catch. What could be wrong?
Assuming by 'ran out of gas at quarter tank', you mean the car wouldn't start until you put more gas, but quarter of the tank was filled with proper fuel.
If this is the case, number of things can be at fault.
Main fuel pump sits inside the fuel tank (usually under the rear seat) and pumps fuel from the tank to the engine. This is usually a quick job to take out and test.
If your car is also equipped with GDI (Gasoline Direct Injection), it can have a second, smaller fuel pump closer to the engine. If the main pump is not faulty, this would be my second guess.
There are number of other things that may cause this type of situation (ECU, Fuel tank sensor, crank/cam shaft sensors if your car has them .etc.) But fuel pumps and fuel lines is probably a good starting point given the limited information.
This problem seems to be a "moving target." It sounds like the problem first presented as "car stops suddenly while driving and even though the fuel gauge shows what should be adequate fuel, adding fuel gets the car going again." Then it moved to "dying while driving down the road" and now it "won't start."
It is good that you've got a bit of history on this and can explain some of how you got to the current "won't start" condition. The fuel system is complicated enough that it may take some work to even identify a logical process to pursue.
I think a reasonable place to start is by thinking that something is preventing the engine from getting enough fuel. Based on what you've said so far, I'm inclined to suspect the vent system on the fuel tank. If it were plugged, a vacuum would be crated as the engine drew fuel from the tank. Eventually the vacuum could overcome the fuel pump and the engine would be starved for fuel. If this is happening you might notice a "whooshing" sound as you open the fuel cap and air is able to enter the tank.
In a good world, designers would anticipate this, and at the very least the components of the fuel system that could be subject to the vacuum would be designed with enough strength to tolerate the vacuum. In the real world, factors such as component cost and weight or perhaps a safeguard that is supposed to prevent a vacuum from forming may lead engineers to decide that they cannot or do not need to make fuel system components strong enough to tolerate a vacuum. So it is possible that the evolution of the problem is due to something collapsing under vacuum.
Another possibility is that the fuel pump which has been working harder than normal to pull fuel out of the tank against a vacuum has failed, leading to your inability to start the car.
So, to proceed:
Listen to the ideas that will be presented about what the problem is, and see if you can recall any clues that might help support one of them.
Keep in mind that problems sometimes compound, for example as Madushan suggested in the first answer, as your self (or your mechanic) "what could have caused this to fail." Try to find and fix the root cause. Cars in general – even the worst of them – and electrical components in particular tend to be very reliable. So when they fail it is important to try to identify and correct the cause of the failure. Otherwise it may come right back.
Be very careful working around the fuel system, gasoline ignites easily. Learn and take adequate safety precautions if you decide to work on this yourself.
Keep revising your question as you learn more about the problem. That will make it much easier to help you.
I had a problem like this once, it turned out to be the fuel filter. Sometimes the filter would clog while I was driving, but after the engine died and the fuel pressure dropped, the gunk in the filter would shift and I could re-start it again right away. Sometimes I had to let the car sit overnight. If your car has an in-line fuel filter, try removing it and blowing it out with some compressed air (I actually used my mouth, but I was on the side of the road in the rain so I was desperate). Then reinstall it and see if your car runs better. In some cars, the filter is part of the fuel pump assembly, so you won't be able to do that easily.