ASP.NET Core reads settings from several configuration providers and merges them into one set of key-value pairs. When two sources set the same key, the source loaded later wins.
The default sources load in this order, so each one overrides the ones before it:
appsettings.json, the main settings file.
An environment file such as appsettings.Development.json.
User secrets, in the Development environment only.
Environment variables.
Command-line arguments.
So an environment variable overrides the JSON files, and a command-line argument overrides everything.
Settings are hierarchical. A key such as Logging:LogLevel:Default reads a nested JSON value, and environment variables write the colon as a double underscore. You read values through IConfiguration, or bind a section to a strongly typed class with the options pattern.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.