Look for the adjustment screws. There are usually two screws: one for adjusting the idle speed, and one for adjusting the air/fuel mixture.
Start the lawn mower and let it warm up. This will allow the engine to reach its normal operating temperature.
Turn the idle speed screw. This will adjust the speed at which the engine runs when it is idling. Turn the screw clockwise to increase the idle speed, and counterclockwise to decrease it.
Adjust the air/fuel mixture screw. This will adjust the amount of fuel that is mixed with the air in the carburetor. Turn the screw clockwise to lean out the mixture, and counterclockwise to enrich it.
Repeat steps 4 and 5 until you find the ideal settings for your lawn mower. The engine should run smoothly, without stalling or surging.
Note: If you cannot get your lawn mower to run properly, you may need to take it to a qualified repair person.