What 410 Gone means
410 Gone is the more honest version of 404. Where 404 means "not found" (with no statement about why), 410 specifically means "this resource existed, was intentionally removed, and will not come back". Search engines treat 410 differently than 404: a 410 page is removed from the index faster than a 404 (which Google retries for weeks before giving up). Use 410 when you delete something permanently and want it removed from search results promptly.
When servers should return it: Return 410 when a resource has been permanently deleted and you do not plan to bring it back. For unknown URLs, use 404.
Example response
curl -i https://example.com/old-page
HTTP/2 410
content-type: text/html
<html><body>This page is permanently gone.</body></html>
More references
For a one-page reference of all HTTP status codes, see the HTTP cheat sheet. For testing API responses, try the API Tester tool. For inspecting responses on the command line, the curl cheat sheet covers the most common flags.