If a country spends less than it gains (that is than it collects from taxes, from investments and from state-owned companies- this is how countries bring in money)
then it has a budget surplus.
In reality however, this is rarely the case and rather opposite is found - budget deficit.