My basement foundation cement blocks are crumbling (I believe my home inspector labelled it "spalling") in a few spots at the bottom, near the floor. It appears as if the sand or dirt is coming in from the ground - or maybe it is just the cinder block material that has deteriorated to a sandlike consistency.?? My question is how do I patch this up. Cement mix? Mortar mix? Other? I'd say the "holes" are 3-4 inches in depth and height.
Thanks so much for anyone's help they may be able to give me.

The sand is probably from the blocks as they are spalling. Rake out any loose residue and fill it back with concrete mix (sackreet) applied as dry as possible and rubbed over with a damp sponge trowel several times while it is curing. This will keep down the cracks around the concrete as it shrinks and cures.

The problem is most likely from too much ground water. You may need to install gutters, fill in with dirt around the outside sloping away from the house, maybe even a French drain at the top of the dirt against the foundation. Anything to get the water away from the house.