The rub is the second most important part of the barbecue process, the smoking technique being the first. There are two main concepts to keep in mind when formulating your rub. The proportion of salt should be great enough to trigger osmosis and begin to draw the moisture from the surface of the meat, and (some may disagree with this) the proportion of sugar should not be excessive because it will caramelize and burn during smoking and leave a bitter taste. However, since sugar contributes to osmosis, it is an important component and shouldn't be eliminated.
Your rub should only be limited by your imagination. The other ingredients to consider can include paprika, cumin, garlic powder, onion powder, black pepper, cayenne pepper, chile powder, oregano, sage, or anything that you enjoy.
Keeping your rub in a shaker makes it easier to apply. Rub should be applied at least the night before smoking. For better flavor let the meat absorb rub for up to three days. Shake the rub over the entire surface of the meat to be smoked. Use a generous amount at first and then, as it starts to get moist and adhere, add more. I don't think it's necessary to "rub" it in. I find that it only results in uneven distribution, and it stains your hands. Wrap the meat loosely in butcher paper and leave in the fridge until a couple of hours before smoking.
Rubs are better than marinades for large pieces of meat such as briskets and pork butts. For cuts such as these, the internal and external fat melts through the meat during cooking keeping it moist. I believe that the texture of the meat is improved by drawing out excess moisture, before cooking, through osmosis. The dry surface of the meat and the rub itself combine to produce a flavorful and attractive crust on the finished product.