A module is a collection of states, variables, and other modules. Modules are separate tasks that are run simultaneously in the system. Within a running module, there is exactly one state active at any point in time. As mentioned in the topic "What is a state?", all statements in the active state are considered to be executed simultaneously while the state is active. Statements in the non-active states are ignored.
Any given module may be run any number of times (limited only by system resources). Each running copy of a module is called an instance, and has its own set of variables and conditions. Each instance of a module runs independently of all others.
Modules and their sub-modules can form a hierarchical structure similar to the Windows™ directory-folder structure, where the module is referred to as the "parent", and the sub-module is referred to as the "child". Between parent and child modules, a powerful relationship known as "inheritance" exists, whereby child modules may inherit some or all aspects of their parent's attributes such as variables. The concept of inheritance applies to all ancestors of a module; therefore, a child module may inherit characteristics from a parent module, which inherited the same characteristics from its parent module, and so forth. Please refer to the topic Modules for more information.