Each gun will show mod slots, if there is a - you can add a slot there, if there is a empty rectangle you have that mod slot open.
From left to right the mod slots are Stock, Barrel, Magazine and Sight. You can add mod slots to a weapon you don't have equipped once you reach Ego 100.
Now each mod says two things, it lists in the description what type of gun it fits, ie Pistol, Manual and Semi-auto sniper rifles.
Also it will show a image of what mod slot it fits. Top to bottom it is Stock, Barrel, Magazine and Sight.
So you need to make sure your mod fits the right gun type and the correct mod slot.