When a lawn mowers engine revs up and down and surges or hunts it's usually caused by either not enough airflow or a dirty or clogged carburetor.
The main jet in the carburetor is a small hole that allows just enough fuel to get through to the engine and when that main jet in the carburetor is partially clogged it will cause the engine to rev up and down because it's not getting enough fuel.
Another common cause of a lawn mower rev up and down or surging is water droplets in the fuel that can get in through rain or just moisture in the air.
So make sure the fuel is clean and doesn't have any water droplets in it because a tiny bit of water in the fuel can cause the engine on the lawn mower to rev and surge.
Back pressure in the fuel due to a dirty or clogged fuel cap or a partially clogged fuel line or fuel filter can also be a cause of a lawn mower engine rev up and down or surging.
So it could mean that your lawn mower is not getting enough fuel due to a dirty carburetor, clogged fuel filter, clogged fuel hose or just a problem with the clogged air filter or partial blockage in the intake of your lawn mowers engine.
An engines Governor can also fail and cause an engine to surge but that's usually on older lawn mowers and not very common.