With a melee weapon, a natural weapon, or even a bare fist, you can strike any opponent within reach, which is normally 5 feet for Small and Medium creatures. Opponents within 5 feet are considered adjacent to you. Some weapons and creatures have longer reach.
Melee attack bonus = base attack bonus + Str modifier + size modifier + enhancement bonus + other modifiers
Base Attack Bonus
Your class or creature type along with your character level or number of Hit Dice determine your base attack bonus. Sometimes these factors combine, such as when a creature has racial Hit Dice and then takes class levels.
Strength Modifier
If your Strength is high, you can deliver more forceful blows that are capable of cutting through defenses. A creature that has a low Strength is unable to apply enough force. Therefor you apply your Strength modifier on melee attack rolls.
Enhancement Bonus
Enhancement bonuses make your weapon better. Such bonuses come from masterwork or magic weapons.
Other Modifiers
Circumstances can modify your attack roll. See Attack Roll
UNARMED ATTACKS
Striking with punches and kicks is like attacking with a melee weapon, except that such attacks usually provoke an attack of opportunity from the foe you attack, provided that opponent is armed. The attack of opportunity comes before your attack. An unarmed attack doesn’t provoke attacks of opportunity from other foes, nor does it provoke an attack of opportunity from an unarmed foe. An unarmed creature can’t make attacks of opportunity.
Natural Weapons
A creature that has a natural weapon, such as a claw or slam, is considered armed. It can make unarmed attacks, but it can’t use its natural weapons as if they were unarmed attacks, nor can it apply abilities that affect only unarmed attacks to its natural weapons.
“Armed” Unarmed Attacks
Sometimes a creature’s unarmed attack counts as an armed attack. A monk, a character who has the Improved Unarmed Strike feat, and a spellcaster delivering a touch attack spell all count as armed. Being armed in this way counts for both offense and defense. So a creature armed in this way can make attacks of opportunity, and such a creature doesn’t provoke attacks of opportunity when attacking. (The act of casting a spell provokes attacks of opportunity as normal.)





