Most castles were built in a Motte (hill) and Bailey (keep) system. The earlier castles consisted of dirt hills (either natural or man-made) upon which a timber castle structure was built, then a large timber fenced-in keep was built around that. Within the keep were other buildings, such as a blacksmith shop, a bakery, the stables, etc. Most systems were built near freshwater sources. For those too far from streams or rivers, a cistern was created to contain water. However, during sieges, this could lead to the demise or surrender of the inhabitants once the water ran low.
This site contains a good definition of the motte and bailey system:
http://www.castles.me.uk/motte-and-bailey-castles.htmExcellent photos of mottes:
http://www.castlewales.com/motte.htmlLots of links to examples:
http://www.absoluteastronomy.com/topics/Motte-and-bailey