Attachments are weapon modifications that can be attached to any weapon in the game, but sometimes they have different effect on different weapons. They are also known as Weapon Mods.
Attachments can be equipped in one of two Mod slots in the base, other being Equipment. Unlike Equipment items (Armor Mods), attachments don't have restrictions and they are all offensive. Some Equipment items can increase damage, but they are caused by hero's armor mods/body than weapons.
Attachments can increase accuracy, damage, fire rate, ammo, or give weapon ability to affect enemies with status effects (elemental rounds). However, most of them also have negative side effect. For example, Auto Trigger turns primary into full-auto weapon, but reduces damage for 20%. Attachments are not actually visible on weapons in-battle, unlike in SFH 2. All modifications on the weapon are caused by their Status. For example if BM9 have laser sights visible, it is not because you equipped them with Laser Sight but because they are in Flawless status.
Elemental rounds give weapon ability to affect enemies with Status effect, but there is only chance for that and side effect is reduced damage per shot, depends on how strong the status effect is.