In Deus Ex: Human Revolution for the PC, PS3, and Xbox 360, weapon upgrades can be found scattered throughout the game, and they can also be sold by the vendors in the city hubs.
All weapon upgrades are essentially items that you pick up, that must be combined with a weapon in order to be added to that weapon. Not all weapons can have all upgrades however, so examine the weapon or the upgrade to see the details of what upgrades that weapon can have, or that upgrade can be attached to.
In order to upgrade a weapon, simply click on the weapon upgrade and select the Combine option. It will be grayed out if there are no weapons in your inventory that it can be combined with. If you do have the Combine option however, once you select it the weapons that it can be attached to will light up and all other inventory items will be grayed out.
Click on the weapon you want to upgrade, and that upgrade will be permanently attached to that weapon.