Mods are pieces of code (usually in JAR files) which change the way the game works. Mods are not created or regulated by Mojang, so some of them may contain malicious code or explicit content. One of the best and safest places to get mods and modpacks is CurseForge, but you should still be careful.
Most mods require a mod loader to run. The two most common ones are Fabric, for mods like the ReplayMod, the Carpet Mod or Sodium; or Forge For mods and modpacks such as RLCraft, SkyFactory, JEI and JourneyMap. We have a guide on how to install Fabric mods here, and a guide on how to install Forge mods here