Magento 2 consists of several types of components: themes, modules, libraries, language packages. The Framework of Magento provides a set of core logic; libraries, PHP code, and base concepts inherited by all the components of the system.
Modules and themes of Magento 2 are used as customization units: modules provide business features, and themes provides look-and-feel features. Both modules and features have their own lifecycle, so they can be installed, disabled or deleted.
Modules can both depend on and relate to each other in different ways. At the same time, they should be independent enough to maximum flexibility for the site customization. In addition to the definition new business features, modules also define the user interface for those features. As a result modules interact with themes.