There are several techniques that we are using during melee combat. Each of them is effective against a specific type of monster, each of them has some advantages and some disadvantages. There are also a few important rules that everyone who is meleeing must follow all the time.
One of the most important rules for meleeing is to always attack a monster from behind. This of course can not apply to the person tanking the monster, but everyone else should always be attacking the monster from the back if it is possible. Most of the raid-level monsters can riposte, which means that if someone attacks them from the front, there is a slight chance that the monster will be allowed to perform a free round of melee attacks on whoever attacked them from the front. When you attack the monster from behind, the monster will not be given the chance to riposte your attacks.
This is even more important for monsters that enrage. Enraging means that the monster will riposte every single frontal attack for about 10 seconds when the monster gets low on health (usually, but not always, 10% of life). If anyone is attacking the monster from the front during enrage, the monster will perform a free round of attacks every single time that person hits the monster (if the attacker is in the monster's melee range) - and that can hurt. If that happens, the healers will usually not be able to heal you fast enough and if they somehow do, it's wasting their mana and thus slowing the raid down. The person tanking the monster unfortunately has no other way than to attack from the front, so that person will need to turn attack off when the monster starts to enrage (you will see an emote) and turn it on again when enrage stops (you will see another emote).
Attacking from behind also gives the tank a better ability to control the direction of the push, and thus moving the monster easily. The tank can then move the monster in circles (to make sure it stays roughly at the same position, and thus the healers and casters will never get out of range) or move the monster wherever is necessary much easier. This of course means that all melees need to pay attention and adjust their position during the fight; no matter what the tank does and where the monster moves, you will need to stay behind the monster at all times.
It is also very important to attack from the maximum possible range. I already mentioned that the monster will attack during ripostes only if the target is in the monster's melee range, and in a moment I will talk about AE rampage. To check where the maximum melee range is, turn attack on and then keep walking back (away from the monster) until you see the message that your target is out of range. Then move just a little bit towards the monster - and you are now attacking from the maximum melee range. Keep in mind that if the monster moves, you will need to move with it to adjust your range often.
Sometimes the monster will be fought near a wall. In such a case, we may choose to use different techniques of keeping the monster at the same spot during the whole fight. These techniques are known as cornering and wall pinning.
During cornering, the tank will stand in the corner, facing the room, and the monster will be standing near the corner and facing the tank, thus exposing its back to the raid. As usual, all the melees should be attacking the monster from the back. The melee push will keep the monster pinned in the corner.
Wall pinning is a bit more complicated: the tank will stand near a wall, facing along the wall, the monster will be in front of the tank, facing the tank. This time, it would not be a bad idea to attack from behind, because the melee would be pushing the monster onto the tank, thus forcing the tank to step back, possibly out of healing range or directly into the healers and casters. To make sure the monster will not move, the melees will need to attack from the side; the push they generate will then pin the monster to the wall. If done correctly, the monster will stay on the same position during the whole fight. Some of the melees will however be vulnerable to ripostes, because they will be slightly in front of the monster, so it is very important to watch the enrage emotes. Wall pinning has an important advantage over wall cornering and other positioning: it allows the healers to stand behind the tank, as far away from the tank as the healing range allows - and this is as far away from the monster as possible; this is especially important if the monster has a bad AE or a huge AE rampage range (more on AE rampage in a moment).