If you use a plane hard for enough years, especially on tropical hardwoods or dusty roughsawn lumber, the sole will wear and get out of wack. And of course, even the best planes, including Lie-Nielson products, can be out-of-wack when brand new. I know from experience. So it is worth knowing how to flatten a sole.
How flat does the sole need to be? It depends entirely on how precisely you need to work. If you are dimensioning boards to remove lots of material quickly, then flat doesn't matter much. If you need to take gossamer thin shavings to create a perfect surface, then it matters a lot.
Does the entire sole really need to be perfectly flat to function well? No. But you need precise, coplanar contact at three critical locations: immediately in front of the mouth (the most critical), at the toe, and the heel. Any metal that projects beyond the plane formed by these three areas must be cut down. On the other hand, any metal below the plane formed by these three critical areas is fine, and can remain depressed.
To check for flatness, you need a precise straightedge. To check for wind (twist) a flat plate, such a float glass, will work. Use machinists dye or a marking pen to mark high spots and areas. You also want to have at least one side perpendicular to the sole, so a precision square is needed to check. I prefer a diemaker's square for checking for square and for checking across the sole because the blades are easier to read precisely.
Begin by checking in front of the mouth, and marking the high spots. You need a rectangular area in front of the mouth at least .25" wide. File this area flat, checking frequently with your square or straightedge.
Layout a similar area at the toe and another at the heel. Mark and then file (crosswise and diagonal) the longer expanses between these critical areas if they are higher. If lower, leave them alone. The goal is to shape the sole so the three critical areas at mouth, toe and heel are less than .001" higher than the rest of the sole.
A superior method to files is a metal scraper. These can be made from wood chisels, or old files. Work the chisel's blade, or end of the file, so it is flat and square and forms a sharp 75 to 90 degree angle. Be careful not to soften the blade by getting it too hot on a grinder. Used in a pulling motion, this tool is very effective at scraping metal away cleaner and quicker and with more control than a file. This is an ancient method that works very well and is satisfying to do.
Rough shaping of the sole using sandpaper and glass can take a long time, and using the very rough sandpaper in an attempt to accelerate the process can make things worse, at least that was my experience using a 10X floor sander belt one time.
When the three critical areas are standing proud, use the glass or precision plate to check for twist. To do this, set the toe and mouth on the plate with the heel hanging off. Does it rock? If it does, locate the gap (or high spot) at the toe with a feeler gage or Mark-1 Eyeball and mark it (leave the mouth alone). Scrape or file the high area so the rocking stops. Repeat for the mouth and heel, with the toe hanging off. Note that the area behind the mouth opening should be low, leaving only the three critical areas in contact with the glass. Finally, check the full length of the sole on the glass. If it rocks, use feeler gages or Mark-1 Eyeball to locate high spots (preferably at the heel if you have a choice), mark and file or scrape.
Attach quality wet or dry paper (320 grit?) to your very flat and well-supported float glass plate or precision granite plate, lube the paper well with water or WD-40 or your preferred non-toxic cutting fluid, mark the entire sole with machinists's dye or a marking pen, and work the entire sole back and forth on the paper. Don't let it travel off the paper. Don't let slurry build up. Don't put much pressure on the plane because pressure will often tend to make contact uneven. After a couple of passes, check the sole. The high areas will be shiny and the low areas will remain colored. If areas other than the three critical areas are shiny, use your file or scraper to cut these high areas down a few passes at a time. Mark and repeat.
Gradually, the sandpaper will abrade the three critical areas at mouth, toe and heel so they are in the same plane, and you will have a very flat sole.
Now, you are thinking that, with perhaps only three areas in contact with the wood being planed (that is not the goal, but it works fine), the sole will wear quickly and get out of wack easily. This is true to some extent, but the reality is that as the three critical contact points wear with use, more of the sole comes into contact with the wood, slowing wear. And as you will see, it is much easier to keep three critical areas coplanar than an entire sole.
It is a mistake to assume that, just because your plane's sole is steel, and it it is used to work relatively softer wood, that it will stay flat forever. Unless it is just a tool cabinet queen, that is.
Two Cents (money back guarantee).
Stan