When multiple resource packs or data packs are enabled, they are merged. Resource packs control the former, while data packs control the latter. Minecraft has two primary resource systems active: one on the client used for visuals such as models, textures, and localization called assets, the other used for gameplay such as recipes and loot tables called data.
A resource is extra data used by the game, and is stored in a data file, instead of being in the code.