Programming Info
If you want to understand more about how the Sims 2 works behind the scenes, then understanding both the file formats used internally as well as how they link together is important.
File Formats
While the Sims2 visibly only has very few formats (Sims2Pack, .package etc), internally it uses very many. Each of these formats has a different meaning, and way of using it and is linked differently.
You can find information here about them: File Formats.
Getting started with modding for the Sims 2 does not (these days) require you to understand these raw formats. SimPE Resource Editing will introduce you to the more friendly view of these formats using a tool called SimPE.
SceneGraph
Spread among the game files are groupings of related data about some game object that are organized into collections called the SceneGraph. These tell the game, for example, how to link a texture to a mesh, or object data to the materials, etc.
You can track through the different parts for a SceneGraph by following the File Links.
There is more information about the scenegraph located in the Modding Infocenter