To upgrade your weapons in The Ascent, you must first locate a Gun Smith. This is symbolized as a Hammer on the map/minimap. There are a few around the world, Cluster 13 and Coder's Cave in Black Lake Towers, to name a few.
Upon finding the Gun Smith, interact with them and choose the option Shop. Select Weapons, then choose the weapon that you want to upgrade. Each upgrade will cost you components and will turn into a Mk 1, then a Mk 5, so on and so forth, all the way up to Mk 15.
The first upgrade costs, one component, and consequential upgrades the amount needed will increase until the next level of component is needed, so 1>2>3>4>5.
There are three components, Basic, Advanced, and Superior. It takes 15 Basic in total to move onto Advanced, then 15 again, until the weapon will be fully upgraded. If you upgrade a weapon and later sell it, the weapon will stay at whatever Mk it was sold at if you ever want to repurchase it.
When you upgrade, on the right side of the screen, you'll see a comparison of the stats of your current gun and then the stats of what it will become after upgrading. You can also see the number of components you have on the Character Screen under Resources.
Check out some of ProGameGuides other articles on The Ascent!