Shadows forms because All of us have seen our shadows when we go out in the sun. In fact, all objects including trees and houses have a shadow when they are in sun light. Why does this happen? Sometime, objects are able to block light an object through which no light can pass is called opaque. An example is our body .Since light cannot pass through, it creates a dark area around the object. This patch where no light falls, is called a shadow.
A shadow moves because the light rays keep changing their direction in which they fall on the object. If the objects moves, then again the shadow moves, as it is formed where ever the objects blocks light.
Shadows are longest in the early morning and late evening , and shortest at noon, because of the angle at which sun light falls on an object.