Coating the rim of a glass with sugar (or salt) will give your drinks that little extra something. (And it will make your pictures look cool, if you regularly photograph cocktails and are concerned about that kind of thing.) If the recipe calls for sugar, any old kind of sugar will do. If it calls for salt, use kosher salt - table salt doesn't have quite the right texture.
Step 1: Get out a plate and arrange the sugar in a circle corresponding roughly to the size of the rim of your glass.
Step 2: Moisten the rim of the glass with a lime (or lemon) wedge - whatever's appropriate to the drink. If your cocktail doesn't contain any lime or lemon, try using a sponge dipped in a liqueur (obviously, one that's already in the recipe - don't go too crazy here) or simple syrup. And don't be stingy with the juice.
Step 3: Dip the moistened glass in the circle of sugar. If you want more sugar, hold the glass perpendicular to the plate and gently roll the outside of the rim in the sugar. Then shake (or wipe) off the excess sugar and you're ready to go.