Resources
A resource is extra data used by the game, stored in a data file instead of in code. Minecraft has two primary resource systems: assets (logical client; visuals such as models, textures, localization) and data (logical server; gameplay such as recipes and loot tables). Resource packs control the former; datapacks control the latter.
In the default mod development kit, assets and data directories are under src/main/resources.
When multiple resource/data packs are enabled they are merged: files from packs at the top of the stack override those below, except for certain files (localization, tags) which merge contentwise. Mods define their packs in resources; mod resource packs cannot be disabled but can be overridden; mod datapacks can be disabled with /datapack. All resources should use snake_case paths (enforced since 1.11).
ResourceLocation
Minecraft identifies resources via ResourceLocation, which has a namespace and a path, generally pointing to assets/<namespace>/<ctx>/<path>. As a string it reads <namespace>:<path>; without a namespace the default is minecraft. A mod should use its mod id as the namespace (e.g. examplemod:<path>), though other namespaces are allowed. ResourceLocations are also used outside the resource system to uniquely identify objects (e.g. registries).