Shaking and stirring each have particular effects on a cocktail. Some basics of these techniques:
Shaking
Aims to chill, aerate, and add water to a cocktail. The ingredients to be shaken are combined (almost always with ice) in your preferred cocktail shaker. The shake should be firm and energetic, and the ice should strike each end of the tin as the shaker moves back and forth. "Double strain" with a hawthorne strainer and a tea strainer after shaking to catch tiny ice chips.
Stirring
Is used to amalgamate, chill, and add water to a cocktail without aeration. This is done in a stirring vessel with a bar spoon. The aim is to smoothly spin the ingredients—without causing air bubbles—until proper dilution and temperature are achieved. Strain with a julep strainer, but if you don’t have one a hawthorne strainer can be substituted.