A magic weapon has an enhancement bonus; the size of the bonus is listed in the name of the weapon (a +1 short sword has a +1 enhancement bonus, a +2 short sword has a +2 enhancement bonus, and so on). Specifically, this is an enhancement bonus to the attack rolls and damage rolls made with that weapon.
A bonus is just a number that you add onto another roll. The “enhancement” term indicates the type of the bonus; the only significance of the type is that bonuses of the same type don’t stack. For example, a +2 short sword must also be a masterwork short sword (since all magic weapons must be masterwork). Masterwork gives a +1 enhancement bonus to attack rolls (not to damage rolls), but since this is also an enhancement bonus, attack rolls with the weapon only get the higher of the +2 enhancement bonus from its magic and the +1 enhancement bonus from its being masterwork, that is, you only add +2 to your attack rolls when you swing it.
The enhancement bonus to damage rolls works the same way: it adds on to the existing roll. A +2 short sword adds +2 to the damage roll. This is added on to the weapon’s damage die (1d6, assuming a Medium short sword), as well as any other appropriate bonuses (e.g. the wielder’s Strength bonus). Again, it would not stack with any other enhancement bonuses to the damage roll, for example from a magic weapon spell cast upon the sword.
It doesn’t actually change the damage type at all; it is just adding a certain amount to the piercing damage that the short sword deals. “Magic damage” as such is not really a thing.
What you are thinking of is the ability to penetrate damage reduction listed as “DR X/magic,” or perhaps “DR X/magic-and-piercing,” as well as the ability to attack incorporeal creatures. The entire 1d6+2 (or more, from Strength or other bonuses) penetrates these sorts of damage reduction and can attack incoporeal foes, because the rules for damage reduction (D&D 3.5, Pathfinder) say:
Some monsters are vulnerable to magic weapons. Any weapon with at least a +1 magical enhancement bonus on attack and damage rolls overcomes the damage reduction of these monsters.
And the rules for incorporeal (D&D 3.5, Pathfinder) state:
Incorporeal creatures can be harmed only [...] by magic weapons [...] Even when struck by magic or magic weapons, an incorporeal creature has a 50% chance to ignore any damage from a corporeal source—except for a force effect or damage dealt by a ghost touch weapon.
Here you can see that it isn’t that the magic weapon changes the type of damage dealt, it’s that the damage reduction and incorporeal properties themselves specify that if the weapon is magic (has at least a +1 enhancement bonus), the entire damage roll ignores the DR or incorporeality.
So when people, or even the rules, talk about “magic damage” or “magic piercing damage,” they’re really using a shorthand: the damage is “damage, that is being dealt by a magic weapon” or “piercing damage, that is being dealt by a magic weapon.”
The types of damage are bludgeoning, piercing, or slashing (collectively, “physical” damage, affected by damage reduction), acid, cold, electricity, fire, or sonic (collectively, “energy” damage, affected by energy resistance), and then more exotic things like force damage (magic missile, automatically hits incorporeal targets and generally exempt from resistance or immunity), untyped damage (the Complete Arcane warlock’s eldritch blast, also generally irresistible), vile damage (various effects in Book of Vile Darkness, cannot be healed), dessication damage (some effects in Sandstorm, can cause fatigue), and so on. The City Magic feat from Cityscape wins for the bizarrest entry here: it converts half a spell’s damage to “city” damage.
Best Answer
Those are all corporeal sources and would only do half damage. Any weapon, spell or other source of damage from a corporeal creature would be treated as corporeal based damage and subject to half damage rules. There are a couple of exceptions. A Ghost Touch modified weapon is an example of a non-corporeal damage source.
Also, any creature with an Incorporeal condition (whether temporary or permanent) or the Incorporeal Monster SubType would be another good example.