For informating about tending to perennials and annuals, see our article on dead heading.
Shrubs
When: The trick for most shrubs is to prune just after the plant is past bloom. Never prune before the blooms, as you will remove the stems that would normally produce the buds. The exception: some shrubs, such as the Endless Summer Hydrangea, bloom on both new and old wood. This means that these plants can be pruned before they bloom and they will still produce flowers (although the yield may be a little thinner than if you waited until later). Try not to prune, or at least don't prune heavily, within the first year after planting; this gives the shrub time to establish itself before you make any modifications to it.
How and how much: For general maintenance and shaping, don't cut back more than 1/3 of the plant at one time and always prune evenly around the shrub. For thinning and removing very old wood, start at the bottom of the shrub and remove any dead, damaged or unruly branches, cutting them as close to the main stem as possible. Take a step back and look at your progress after every cut or two to make sure the plant looks even and not too thin. Periodic thinning will promote all around good health and will keep the shrub looking full, but not gnarled. You should also remove suckers from time to time as they sprout up. Suckers are new shoots that grow up around the base where the stem meets the soil.
Where: If shaping by hand, trim the stem down to a leaf node (that is, don't leave a stretch of bare stem if possible). It's also beneficial to cut at an angle to prevent water from pooling in the cut and causing fungus or rot. If thinning and removing dead or old wood, cut as close to the main stem as possible. If the cut is very large (more than an inch in diameter), you may consider using a pruning sealer, but it's generally not necessary for shrubs.
Trees
Pruning to maintain size or shape: like shrubs, never prune trees back more than 30%, and try to cut them back evenly. Pruning can happen much earlier for trees, usually in February or March, while the tree is still mostly dormant. This is not true if you're removing branches (see below).
Pruning to thin or remove branches: when removing a whole branch, either because it is interfering with the landscape or because it is heavily damaged or dead, wait until later in the season when the tree is out of dormancy. Consider that open wounds are vulnerable areas where mites and boring insects can enter the hardwood of the tree; leaving a wound during dormancy would increase the chances of a problem arising. For best recovery, use a pruning sealer to cover the exposed wood (we carry a paint-on, tar-like product in our store).