From Destinypedia, the Destiny wiki
Mods are a form of upgrade in Destiny 2. They are used to boost the potency of weapon perks, change weapon stats, provide bonuses for Exotic weapons via Catalysts, and add or improve features onto a piece of Armor. Some mods can also be equipped onto Ghost shells, and provide a variety of bonuses.
Weapon mods are those that can be slotted into any Legendary weapon released during or after the Forsaken expansion. Almost all of them can be used an infinite amount of times upon acquisition, but there are a few that are single use. A full list of weapon mods can be found below (any info in italics was gathered from the Community Research section of each mod on Light.gg):
Armor mods are those that can be slotted onto any piece of armor released or re-released during or after the Shadowkeep expansion. They have a multitude of effects and requirements, and a maximum of 5 can be slotted onto an armor piece at a time. There are also seasonal Artifact mods, that are unlocked via the seasonal artifact and expire at the end of the current season. A full list of armor mods can be found below: