Attack Power is one of the most important secondary attributes for physical damage dealers.
Every 14 Attack Power increases your DPS with physical attacks by one, with fractions included (for example, 7 Attack Power increases your DPS by .5).
AP adds to the damage done by your weapon using the formula AP * Weapon Speed / 14.
A 1.0 Speed weapon with 140 AP will gain 10 damage, which works out to 10 DPS.
A 3.0 speed weapon with 140 AP will gain 30 damage, which also works out to 10 DPS.
Melee attack power (MAP) increases the damage done by melee (short-range) attacks. Ranged attack power (RAP) increases the damage done by ranged attacks.
Items listed as giving a bonus to Attack Power provide both MAP and RAP.
Spells or abilities giving a bonus to Attack Power (such as Battle Shout) will usually grant both, unless they specifically mention one or the other, as in the case of Hunter's Mark. Historically, ranged AP has been cheated out of a lot of the AP effects other classes provide, but this has been largely done away with.