It sounds like you're doing it right. The 20-sided die (d20) is used (with modifiers) and compared against the target's Armor Class. If it equals or exceeds the AC number, the attack hits!
Then, each type of weapon or attack has a particular damage range. For example, as you said above, a short sword uses 1d6, plus whatever modifiers (usually the strength modifier for melee weapons, sometimes magical bonuses, etc.) That's the amount of damage the attack does. That damage is subtracted from the creature's Hit Points.
When they attack the PC, the same thing happens. Repeat until someone dies!
(EDIT: Death as only outcome is grossly simplified for illustration purposes)