This has to be done via a workbench. Luckily, The Unreliable has it's very own workbench to help out. Every planet seems to have at least three also.
Mods can be dropped by enemies, such as Marauders, looted from crates or brought from vendors.
Be careful, if you want to change the mod on weapon, it'll destroy the one currently installed.
Armour can also be modded. A set of armour can have up to four different styles of mod active at once. Some weapons can only have one (normally Melee, Pistols and Snipers) and others can have two active, a standard mod and an effect, such as corrosion or flames.
The tinker is very important to do on the weapons you love and worling towards other trophies will unlock this naturally as they tend to be easier with more damage.
Tinker cost bits, so make sure you have enough for the weapon you want to keep up to date. Weapons can only be upgraded via this way upto five levels above the current player level, so the game blocks them off if they get too strong.