You pick it up and swing it (or shoot it).
Use your Base Attack Bonus and any modifiers. Typically you'll use either Melee or Ranged. If you bought your BAB up straight (2 points per +1) than you use that number whenever you attack, whatever you attack with.
If you specialized, like myself, with feats or other methods, than it plays out differently. I took alot of Attack Focus (melee), a feat that gives you +1 to either melee or ranged attacks. I took seven ranks in the feat for a total of +7 to melee (the maximum bonus for our power level). So, as long as it's melee, I attack at +7. However, anything ranged and my bonus is +0.
Most weapons have a damage value of their own. All guns do. Most melee weapons do. You can add strength bonus to melee attacks in most cases (I think) but you still hit the ceiling set by the campaign power level, regardless of the combination of weapon and person damage.