Firstly, DON'T PANIC! Don't swing wildly trying to finish them off quickly; your stamina will drain and you will take damage.
The best approach is usually to retreat and use a divide and conquer approach to thin-out the enemies' numbers, by drawing them out one at a time with a ranged attack. If you're trapped and unable to retreat though, you can use the following tactics:
Don't let the enemies surround you. Lock on to one of the enemies and move around to position the whole group in front of you. Keep them in front of your shield.
Keep your shield up, but be aware of your stamina level. Lower your shield and back away to allow your stamina to recharge.
Try and block hits from multiple enemies before you attack. Time your attack to occur after you've blocked their hits. If your weapon is capable of hitting multiple enemies in a single swipe, take advantage of this.
Concentrate on killing one at a time. Try and hit the same enemy with every attack. This will reduce their numbers more quickly.
Use the roll move to evade multiple attacks when low on stamina. (This also uses stamina, so be sure to allow your stamina to recharge afterwards!)
If you're also being shot at by a bow wielder, stay moving to evade the arrows/bolts.
Backstab and/or parry where possible. You are invulnerable while the backstab/parry animation takes place. High damage too!
If you have trouble attacking without getting hit, try a spear or rapier-type weapon. These weapons allow you to strike while keeping your shield up. (Estoc is available early in the game, in New Londo Ruins before the bridge across the water.) Be extra careful about your stamina level since your stamina recovers very slowly when you shield is raised.
Good luck!