Restricted fuel delivery and malfunctioning spark plugs are the most common reasons for cars to hesitate during acceleration. The first step to identifying the cause of this is to find out if the car is fuel-injected or if it has a carburetor. Fuel-injected cars and cars with carburetors deliver fuel differently, so there are different ways to diagnose and fix problems with acceleration.
Fuel-injected cars often experience clogs in the oil filter. This is especially a problem for cars that are filled up with low-quality gas and cars that have recently run out of gas. Try adding a fuel injector cleaner and filling up with premium gas for a couple weeks. In addition, check to see if the fuel injectors are functioning properly, and make sure the fuel pressure is within normal range.
For cars with carburetors, check the fuel pump. This is an essential part for fuel delivery, so it is the first thing to check when a car is hesitating during acceleration. It's also possible that the car is hesitating when accelerating because the carburetor is failing.
If the problem persists, have the spark plugs tested to see if there is a malfunction. Also inspect the wiring for frayed edges. Other things to check include the air filter, fuel filter, timing and gas leaks.