At the most basic level, configurations are just a mapping of keys and values, which can be represented as a PHP array and translated into the YAML format.
Configuration management uses schema definitions for configuration entities. The schema definition provides a configuration namespace and the available keys and data types. The schema definition provides a typed data definition for each option that allows validation of the individual values and configuration.
The export process reads the configuration data and translates it into the YAML format. The configuration manager then receives the configuration in the form of YAML and converts it back to a PHP array. The data is then updated in the database.
When importing the configuration, Drupal checks the value of the configuration YAML's uuid key, if present, against any current configuration with the same Universally Unique Identifier (UUID). A UUID is a pattern used in software to provide a method of identifying an object across different environments. This allows Drupal to correlate a piece of data from its UUID since the database identifier can differ across environments. If the configuration item has a matching machine name, but a mismatching UUID, an error will be thrown.