A nut shim acts as a spacer between the nut and neck raising and lowering the distance between all of the strings at the lower end of the guitar, starting at fret 1 and moving towards the body of the guitar.
A neck pocket shim acts as a spacer between the neck and body, changing the angle from which the neck protrudes out away from the body.
Try to imagine the strings of your guitar as a flat plane and the fret board as a parallel plane running underneath them. The angle of the top plane which contains the strings is controlled by the position of the tremolo and the nut. The angle of the lower plane which is the fret board is controlled by the neck pocket of the body.
If your setup is perfect these two planes will have an equal distance between them at any point. If your guitar doesn't look this way try adjusting the height of the tremolo itself first. This will usually take care of the problem unless you find your action becoming too high or to low equally across the length of the fret board. If adjusting the height of the tremolo corrects the problem but leaves you with too high or low of an action (distance between the strings and fret board) then you will need to resort to using a shim. You may want to “block” the tremolo before you start the shimming operation.
Shims can be found and used in two different areas of the neck. One is under the nut and the other is directly under the heel in the neck pocket of the body.
Nut shims are usually made out of one or more thin sheets of brass. Shims located in the neck pocket are usually made out of a thin piece of wood. In either case you can produce your own shim if needed by using a sheet of heavy stock paper such as a business card. For shims in the neck pocket you might need to fold the paper stock 3-4 times to get the required thickness needed, then trim to fit properly.
First determine if the distance between the strings and fret board is to close right up against the nut itself. If this is the case then add a shim under the nut and raise the tremolo by adjusting the tremolo posts until the strings are an equal distance from the fret board down the entire length of the neck. If the distance between the strings and the fret board located right up against the nut is OK then you will have to place a shim in the neck pocket to correct your problem as directed below.
If your strings are higher on the Low E side, place the shim in the neck pocket under the heel of the neck and parallel with the length of the neck on the Low E side, which raises the entire neck down the Low E side when it is bolted on. Before doing this check the angle of the tremolo to make sure it is flat against the body and not floating at an angle.
If your strings are higher on the High E side do the opposite, as explained above, by placing the shim parallel to the neck on the High E side in the neck pocket. Again before doing this check the angle of the tremolo to make sure it is flat against the body and not floating at an angle.
If your strings become higher the closer they are to the body place the shim across the neck pocket in the end closest to the neck pickup. This will turn the other end of the neck pocket into a fulcrum point and move the head stock towards the back of the body lowering the strings over the high end frets.
If your strings become lower across the high end frets place the shim across the end of the neck pocket furthest away from the neck pickup. This will raise the headstock away from the back of the body, raising the strings up from the end of the fret board, closest to the body.
In some instances you might find that you need the shim to raise only one corner of the two planes as described above. In these rare cases, make a smaller shim and place it in the appropriate area of the neck pocket. Of course upon removing the nut from the neck or the neck from the body, if you find a shim already there
determine what action it was doing in the first place then make the necessary corrections.
Shimming a guitar neck is definitely an ART. However, if you look at it scientifically, as angles against a plane, you can understand the “how and why” of adjusting a guitar neck this way.