A shim is a thin piece of
wood or
metal. I'ma talk about wooden shims first because those are the only kind I've used. These are very useful when you want to
disguise the
fact that you built a crappy
truss. See, when a
gap is left in your truss, either between the
kingpost and the
bottom chord, an upright and the bottom
chord, an upright and intersecting webs, or a web and a top chord, it is necessary to close that gap (to protect the
reputation of yourself and your truss company). To do this, you take a thin piece of 2x4, usually no more than a half an
inch wide, and jam it into your gap. Then, you
plate the
joint as usual.
If you need a shim that's wider than a half an inch, or you find yourself using shims often, you have bigger problems on your hands. I would suggest reevaluating the whole truss and setting it up all over again. You may have had warped chords when you set it up originally.
Shims are usually just cut to fit when the need for one arises. However, you can buy boxes of pre-cut shims at just about any hardware store. Those shims are long pieces of wood, like 8 to 10 inches long, with an angled cut to them so it gets gradually wider, that way you can chop the shim to the width you need.
When my family was building our house, we used some shims under our trusses after we set them because apparently the outside walls of our house were taller than the inside walls and we were forced to compromise with shims.
Other kinds of shims, i.e. metal ones, are used in fields other than carpentry. For example, let's say the handlebars on your bicycle are loose and you don't have a screwdriver with which to tighten them. An option would be to jam a thin strip of flexible metal (like a piece of an aluminum can) between the support thingy and the handlebar tightener thingy, thus reducing the space between the two and making the bars tighter.