If this noise is like a loud ticking at a fast pace, it would be your starter going bad. If the noise is a loud boom/pop sound from the rear of the car, it would possibly be that the exhaust is backfiring.
Many people run the tanks dry and ruin fuel pumps quicker this way, fuel cools your pump, and when you are below 1/4 a tank or so depending on size and the model of the vehicle the pump is only cooled by the fuel that flows through it instead of around it as it is no longer submersed in fuel, so now the pump generates a lot of heat. If the pump still runs then all you have to do is prime the pump by turning key on not to run, just on a couple of times. this should give a pretty good prime for the pump, but you will still have air in the lines and it may start and stall a couple of times before you get it running good with no air in fuel.
It is one of three things. It isn’t getting proper spark, proper fuel, or proper compression. Use the process of deduction and find out. If the engine turns over the starter isn't bad.
The first is that you may have water in your fuel. This problem is prevalent in areas where there is or has been flooding, or areas of consistently high humidity
The second thing you may want to have checked is the alternator belt. It may be glazing which means that it will slip on the pullies and your alternator will slow down and your car's electrical needs are being supplied by the battery, even when driving. If your car dies while driving with a glazed alternator belt, the car can be re-started after a short while, but you will not be able to do this very many times without replacing the alternator belt. When the car is running on the battery, you will notice all electrical functions reduce.