Reports so far indicate that the Yak-52 carries a gunner in the rear cockpit, who takes aim on drones using some kind of infantry weapon, likely a light machine gun.
Prop planes engaging in gun combat hasn’t been much of a thing since WW2, aside from some sporadic incidents using World War-era hardware:
The last dogfight between propeller airplanes happened in Central America
In 1969, Honduras and El Salvador fought a brief but explosive war that lasted 100 hours.
But it may make a lot of sense in the context of countering UAVs.
Drones in a lot of ways resemble post WWI or early WWII aircraft - slow speed (not jet powered) and so what worked back then still works. Will drones move to high speed jet powered aircraft or remain slow speed - that is an open question (and a mix might be correct), only time will tell.