With a normal melee weapon, you can strike any opponent within 5 feet. (Opponents within 5 feet are considered adjacent to you.)
Some melee weapons have reach, as indicated in their descriptions. With a typical reach weapon, you can strike opponents 10 feet away, but you can’t strike adjacent foes (those within 5 feet).
Attack Rolls: An attack roll represents your attempts to strike your opponent.
Your attack roll is 1d20 + your attack bonus with the weapon you’re using. If the result is at least as high as the target’s AC, you hit and deal damage.
Automatic Misses and Hits: A natural 1 (the d20 comes up 1) on the attack roll is always a miss.
A natural 20 (the d20 comes up 20) is always a hit. A natural 20 is also a threat - a possible critical hit.
Damage Rolls: If the attack roll result equals or exceeds the target’s AC, the attack hits and you deal damage.
Roll the appropriate damage for your weapon. Damage is deducted from the target’s current hit points.
Multiple Attacks: A character who can make more than one attack per round must use the full attack action (see section Full-Round Actions) in order to get more than one attack.
Fighting Defensively as a Standard Action: You can choose to fight defensively when attacking.
If you do so, you take a -4 penalty on all attacks in a round to gain a +2 dodge bonus to AC for the same round.