Drupal core previously shipped with a 'replace' section in composer.json indicating that it provides every core module. This explicitly prevented composer from downloading contributed versions of core modules. To enable contrib alternatives to core modules to be installed, this section has been removed.
For example:
composer require drupal/hal
This would previously refuse to install the contributed HAL module since it was provided by core, but after this change, composer will download the HAL module as it would for any other contrib module.
Drupal will always load modules in sites/*/modules or modules before the core/modules directory.
See also the handbook page for removed core modules and themes..
Note that contributed modules that specify dependencies on core modules may need to update their dependencies in some cases, for example if they specify a specific core version, this will need to be removed or updated to match the contributed version number of the module.