WordPress automatically sets up default REST API endpoints under the /wp-json/ URL. When a client sends an HTTP request like GET /wp-json/wp/v2/posts, WordPress matches this to the posts endpoint and returns a JSON list of posts. Similarly, requests to pages, users, and comments endpoints return their respective data. If the client requests an endpoint that does not exist, such as /wp-json/wp/v2/nonexistent, the API returns a 404 error. POST requests to endpoints like /wp-json/wp/v2/posts can create new content if the client is authorized. The root API endpoint /wp-json/ returns a JSON index of available namespaces and routes to help clients discover the API. This flow ensures WordPress sites provide a standard way to access and manipulate site data via HTTP requests.