Start here. This is the direct spoken answer to practice first.
Why this question matters
CORS is a browser access rule around cross-origin JavaScript. It is often mistaken for authentication or a server-to-server firewall, which leads to both broken frontends and weak security assumptions.
A browser can send some simple cross-origin requests directly, but a non-simple method, header, or content type causes an OPTIONS preflight first. The browser asks whether the origin, method, and headers are allowed. The API returns the appropriate Access-Control-Allow headers, and the browser decides whether the actual request may proceed. I configure an explicit origin allowlist, required methods and headers, and place ASP.NET Core CORS middleware in the documented pipeline position.