What is a Resource
A resource is any entity that an API exposes to clients. In a REST API, resources are the nouns: users, orders, products, comments. Each resource has a unique URL that identifies it (/users/42), and the HTTP verb determines what you do with it.
How it works
Resources can be individual items (/users/42) or collections (/users). They can nest to express relationships (/users/42/orders). The representation of a resource — the JSON, XML, or other format returned — is separate from the resource itself. The same resource can be represented differently depending on the Accept header.
Why it matters
Thinking in resources is the foundation of REST API design. URLs identify things, not actions. You don't have /getUser — you have /users/42 with a GET verb. This separation of identity (URL) from action (verb) makes APIs predictable. If you know the resource URL, you know how to read it (GET), create a new one (POST to the collection), update it (PUT/PATCH), and delete it (DELETE).
See How REST Works for how resources, URLs, and verbs compose into a complete API.