Sweep the wood floor and dispose of any surface grit with a dustpan
Scrape out the gaps using a flat-head screwdriver or putty knife for thinner gaps. There might be old wood filler, impacted mud, and other debris settled in the gaps.
Vacuum out the loosened debris from the gaps with a shop vacuum or other vacuum with a hose attachment. The better your cleaning job, the easier it will be to place the shims.
Look at all the gaps. Determine how much of different widths you need, then use 1-by-4s or extra flooring boards and shave off narrow shims from their length with a tablesaw. It is recommended you have experience with a tablesaw, or find someone who does. It helps to have another piece of wood to push the board through when it gets close to the blade.
Put wood glue on both side of the shim, and fit it into the gap. You might use more than one width for one gap, some are wider in the middle and taper at either end. Just break of the shims to make them the right length. It is almost better to have shims that are a little smaller than the gaps, so they fit easily.
Wait for the glue to dry, overnight is best. Sand off any excess shim sticking up from the floor.