How it works
The first digit gives the family. 2xx means success (200 OK, 201 Created, 204 No Content). 3xx is a redirect (301 moved permanently, 302 or 307 moved for now, 304 not modified, so use the cached copy). 4xx is a problem with the request (400 bad request, 401 not signed in, 403 not allowed, 404 not found, 429 too many requests), and 5xx a problem on the server (500 internal error, 502 bad gateway, 503 unavailable, 504 gateway timeout).
The right code matters beyond tidiness. Search engines follow a 301 and pass rankings to the new URL, but treat a 'page not found' message sent with a 200 status as a 'soft 404'. Monitoring, retries and caches rely on these numbers too: a 503 with a Retry-After header tells clients to come back later, while a 400 tells them that retrying the same request will not help.
Related terms
More in How the web works
Requests and responses