For the rogue Combat tree, see Rogue Talents.
Learning to battle in combat and make the right decisions is a critical component of World of Warcraft.
Most enemies in the game have a red name when you target them. These mobs will attack you if you get near them. Otherwise, combat begins when you take an aggressive action toward a hostile or a neutral (yellow name) target. This is referred to as Pulling.
It is important to note whether or not you are "in combat," because certain abilities like Stealth and Charge cannot be used once combat begins. The easiest way to see this is by looking at your Character Portrait, and noting if the circle where your level is indicated has been replaced by crossed swords. So long as this is the case, there is something that is trying to kill you somewhere.
An enemy will stay locked into battle with you until you kill them, die, or run away. In order to run away, you must travel a decent distance away from where the battle began so that the target will leash. This will not work in an instance unless you leave the zone. Note that some classes have an ability that removes them from combat, but it is the equivalent of running away without going anywhere.
It is assumed that in most battles, you will be attempting to kill your enemy. To this end, you will need to be able to deal them damage. The simplest way to do this is to turn on Auto Attack. If your character is in a position to, you will simply swing your melee weapon at your target for as long as it makes sense to do so.
The following things must happen for an attack to be made:
A more simple version of this would be to say that you can attack every so often, that you may or may not hit, and that when you do the game deals damage.
The same principle applies for Auto Shoot and shooting a wand, although the range will be different and some of the effects might be ignored. (For example, arrows cannot be dodged, and wands ignore armor.)
Using basic auto attacks are fine in some circumstances, but to use your character to their best potential, you will need to use abilities to speed things up or protect yourself. Casters in particular will probably not want to focus on using weapons. Many abilities are instant, but for those with a Cast Bar, a meter will appear that will fill up in the amount of time it takes to initiate that skill. Note that if you are attacked during the casting process, your spell will be partially interrupted and take a bit longer.
Most classes use Mana to fuel their abilities, but Rogues use a different resource called Energy that has a maximum pool of 100 and refills rather quickly, and Warriors need Rage generated from attacking and being hit in order to use their skills. Since mana does not refill anywhere near as quickly as energy or rage, casters can run out of steam in a prolonged battle, whereas rogues and warriors really only have to watch their health. However, a caster's mana pool also lasts a good bit longer than a full bar of energy or rage.
All characters have some abilities that are defensive in nature. Some are meant to reduce damage taken, others are to avoid it, and some simply heal it back. While a battle that you start at full health against a single normal opponent is not likely to kill you, there may be times where your health will be a critical concern.
The most frequent way to attempt to leave combat is by running. One must be careful not to flee in the direction of other hostile targets, or the situation will get no better. However, if you should travel a bit away from where the fight was taking place, your enemies will eventually leash. A leashed enemy will immediately stop and run back to their original location before the battle began, evading any attacks that are made until it gets there and regenerating it's health at a tremendous rate. Note that if someone else pulls aggro from you or you continue to attack it, the traveling distance to leash the mob will reset.
A few classes have alternate means of escaping combat. Best known among these is the hunter's Feign Death, which causes the hunter to flop on the ground and play dead. It is possible that the hunter's pet will remain in combat when this happens. Rogues also have an ability called Vanish that immediately puts them into a stealth state and makes their opponents lose track of them and run off. At much later levels, a Mage can also cast Invisibility to fade out of battle. All of these abilities will produce the same results as leashing if there is nobody else with hate against the target.
When your opponent has at least two targets to choose from -- either you and a groupmate, or you and your pet -- it will need to choose who to attack. It does this based on a concept called Threat. Each action you perform that in some way affects an opponent will increase the amount of threat it develops against you, including healing other targets on the mob's hate list -- the set of characters that have built some amount of threat toward the mob. (Note: The terms threat, hate, and aggro are sometimes used interchangeably by players due to their usage in other games. See each term's article for more details.)
Loosely speaking, the mob will attack whomever has the most threat.  If you find a way to reduce the amount of threat you have, or your groupmate/pet suddenly generates more than you, the mob will change targets. The act of becoming the new target is often referred to as pulling Hate or Aggro. In group encounters, it is usually important to ensure that the player with aggro is the tank for the team, since this person will generally have better odds at surviving the attacks, and it is often difficult to reestablish the tank's place atop the hate list once the mob goes running after a caster some distance away.
The converse of this is fighting more than one target at a time. While this will often happen when fighting in a party, especially running through an instance, a solo player must be especially careful when doing this. If you have the ability to remove one of the opponents from the battle by crowd controlling them, this can make a significant difference. Otherwise, it would be best to try to pull only one target if you are able to. This is not always an option in instances, where the targets are often linked to come together regardless.
As you travel to different areas of the world, your opponents will be a different level. Compared to your own level, your opponent may have certain advantages or disadvantages. Higher-level opponents are more likely to hit you successfully, more likely to get a critical hit, and more likely to resist or avoid your attacks. It is generally not recommended to fight any opponents more than 3 levels above you, although this can vary based on the classes and spec of the character.
Higher-level targets will also naturally hit harder and have more health simply because they are higher in level. However, there are also mobs in the world marked as "Elite," which means they have more health and damage output, but without the other advantages a higher-level opponent would. Elites are generally designed to be a decent challenge for a party of the same level, or at least to say that they will be more difficult to kill than a normal mob.
Besting your opponent will result in a gain of experience if the opponent is not trivial to you, and the opportunity to loot the body. In some cases, you may gain a few points of reputation as well. Of course, in the case of being attacked, your reward is your own survival!