This article is being written based on the Spark distribution.
Installation profiles are like modules
All installation profiles must have:
files, and they can also have a profilename.install file.
The profilename.profile file has access to almost everything a normal Drupal modulename.module file does because Drupal is fully bootstrapped before almost anything in the profile runs. The primary exception is that st() should generally be used to translate strings instead of the usual t() because the localization hasn't been set up until the installation process completes. Profile files should reside in their own directory within the /profiles directory to be loaded.
The profilename.info.yml file should look similar to this: