When troubleshooting a small engine, rule out simple problems first by checking that the engine has enough fresh fuel and the correct oil or oil/gas mixture, checking for spark, and confirming that fresh gasoline is getting to the carburetor. Surging, stopping or running only on choke indicates a carburetor problem, which requires identifying the type of carburetor, either a bowl or diaphragm. Always begin by reviewing the engine's operating manual before troubleshooting.
To check for spark, make sure the engine ignition is on, disengage all attachments, and place the transmission in neutral. Remove the spark plug, and ground the "hex" part of the plug to a bare metal part of the engine. If the spark is weak and yellow, replace the spark plug; if it's blue, move on to the fuel line.
To ensure that gas is getting to the carburetor, make sure the fuel shutoff valve and fuel cap vent are open, check for plugs or kinks in the fuel line, and verify that screens in the tank are clean. If the fuel line appears fine, placing 1 teaspoon of gasoline carefully down the spark plug hole or adding it to the starting fluid in the carburetor throat may start the engine. If not, or if the engine starts and quickly dies, either the carburetor needs service, or there is an air leak.
Carburetor problems, when the engine starts but runs poorly, can indicate that the passages inside a bowl-type carburetor are plugged, the air filter is dirty, or the float needle needs replacing. With diaphragm carburetors, the problem is usually that the diaphragm has hardened and needs replacing.