Practice on the duel server. Basically what some good offensive players do is go for aggressive inside swings, and use their footwork to set themselves up better for it. They will try to push themselves to one of your sides, then do the swing that will connect the fastest, and if you don't react in time to their swing or footwork, you will be spammed to death.
You can counter this just by doing the correct swing and having good positioning. The basic idea is if they are on your right side, swing right to left. You can hit faster by simply strafing to your left as you do this. More advanced is turning your entire body, so they aren't so much directly in front of you anymore but you approach them at an off angle and swing while pivoting your body to create some silly animation abuse and instant hits.
When you are playing defense you basically want to do the opposite of this to create as much distance between you and their swing animation as possible while also setting up the most effective counter attack that you need to get ready as soon as you are done blocking. Also keep in mind some heavier weapons, like the Sword of War, will give you weapon stun if they do a held overhead attack, which paralyses you after a block for an extra half second and often means you need to block twice.