I've answered a number of questions related to this in recent times, so I figured I'd explain in detail the entire life cycle of a PartModule.
Birth
When parsing a part from the game database, KSP looks for MODULE nodes to parse as part modules. It looks for a name = XXX value in the MODULE node and tries to find a class that derives from PartModule with that name. If it finds one, it will attach an instance to the part's GameObject (part modules are Unity components and can only e