Every class has a set of starting weapons. To switch weapons, you can find another weapon on a level or pick a skill on a Skill Tree. For example, if you play as a Gunslinger, you can select the "Gunner" skill and start with PAC-15 instead of Compact SMG.
Most of the weapons can be upgraded. Upgraded weapons have new stats and may have different perks. To upgrade a weapon, you need to earn enough Weapon XP and purchase an upgrade. Weapon XP is earned by using certain weapons. For example, if you want to upgrade your Battle Rifle, you first need to obtain said weapon during gameplay and use it. You'll see a screen with Weapon XP at the end of each game session. As soon as you reach enough Weapon XP, you'll be able to purchase an upgrade for this weapon.
To purchase an upgrade, you must go to the Campaign menu and pick Customize - Weapons. There you need to find a weapon you want to upgrade and purchase a desirable upgrade.
Please note: You won't get more Weapon XP for said weapon unless you purchase an upgrade. For example, if you earned enough Weapon XP for the weapon to reach Level 2, you need to purchase a Level 2 upgrade to start receiving Weapon XP for the weapon again.
Some weapons have a Unique Version. For example, Combat Shotgun has a Unique Version that has a unique "Eagle Scout'' perk. Eagle Scout increases shotgun range by 150%, and each pellet can penetrate one additional target. You need to meet certain conditions to get a Unique Version of a weapon.
Conditions can be found in the Customize menu. Highlighting a Unique Version will show you the requirements needed to be reached to unlock this version of the weapon.