In Spring Boot, configuration files can include placeholders like ${DB_URL} that refer to environment variables. When the application starts, Spring Boot loads these files and looks for such placeholders. It then checks the operating system environment variables for matching names. If found, it replaces the placeholder with the environment variable's value. If not found but a default value is provided (like ${DB_USER:defaultUser}), it uses that default. If no default is given and the variable is missing, the application will fail to start. After resolving all placeholders, Spring Boot injects these values into the relevant beans, such as the datasource bean for database connections. This process allows the application to be configured flexibly across different environments without changing code.