A NICOS session can be in one of four execution modes:
The cache tracks the current master session and only allows one such session at each time.
The current execution mode is available as the _mode attribute on every device instance.
A NICOS setup is a collection of configuration data (mostly configuration of devices) that represents a part of an instrument configuration. Every NICOS session has one or more setups loaded. Setups can depend on other setups, so that different instrument configurations can share common devices easily.
Setups are described in detail here: Configuring NICOS: Setups.