There are some basic rules with shadows. First, you have to look at temperature. If the light source is warm, like an incandescent bulb or direct sunlight, the shadows tend to be cool. If the light source is cool, like North light, shadows tend to be warm.
The second thing to understand about shadows is there are two types, core shadows and cast shadows. Core shadows have soft edges where the shadow breaks on a curved surface. Cast shadows, on the other hand, have hard edges where one object blocks the light, projecting a shadow on another surface. One thing to note is that a long cast shadow tends to become lighter toward the end.
Third, in shadow there tends to be about three values, the lighter value where the core shadow breaks, the middle value, and the darkest darks.
Finally, the hardest part of handling a shadow dealing with reflective light. Sometimes, light bounces onto surfaces in shadow, giving just a hint of light. However, a common mistake is to make the reflective light too light. If made too light, then it will break the sense of light and shadow in the piece, and the painting will break down. It is better to err on too little than too much reflective light. I had an instructor tell me to make it so that it is almost not there.
For me, when I paint portraits and still lifes, I tend to use a warm transparent pigments for my shadows, like transparent oxide brown, though burnt umber would work in a pinch. Sometimes, I cut that with a little ultramarine blue, so that it is not crazy warm. (Take a look at Rembrandt, or Sargent). For landscapes, and paintings outside, I tend to use cool opaque pigments, like ultramarine blue, mixed with a little alizarin crimson, mixed with just a touch of titanium white to make it opaque. Sometimes Payne's grey will work too, though I generally like more intense color.
That is it for the Dave method of handling shadows.
Take a look below. The portrait is an example of warm shadows. The cityscape is an example of cool shadows.
Here is a more complex example. This one has two lights sources, cool North light coming from the left, and warm incandescent light coming from the right.