Modules can define dependencies to ensure that those modules are enabled before your module can be enabled.
Here is the info.yml for the Responsive Image module:
name: Responsive Image type: module description: 'Provides an image formatter and breakpoint mappings to output responsive images using the HTML5 picture tag.' package: Core version: VERSION core: 8.x dependencies: - breakpoint - image
The dependencies key specifies that the breakpoint and image modules need to be enabled first before the Responsive Image module can be enabled. When enabling a module that requires dependencies that are disabled, the installation form will provide a prompt asking you whether you would like to install the dependencies as well. If a dependency module is missing, the module cannot be installed. The dependency will show a status of (missing).
A module that is a dependency of another module will state the information in its description, along with the other module's status. For example, the Breakpoint module will show that the Re module requires it as a dependency and is disabled:
