Click here for information about Targeting Dummies.
A player's target is the PC or NPC that they are directing their actions towards. To select a target, simply click on it. You can also select yourself or a party member as a target by clicking on their Character Portrait.
You will receive a Nameplate for your target next to your own. If the target's name has a green background, it is friendly. A red background is hostile. Yellow is neutral. Certain actions can only be performed on a friendly or a hostile target. Typically, when an action cannot be performed on a target because they are out of range or an invalid target, the hotkey for the ability will partially turn red. By default, the key indicator for the hotkey goes from white to red.
Pressing the tab key will, by default, target the nearest enemy in front of you. When you are feeling lazy and just want the nearest enemy, this can be handy, however it is also not completely reliable. Tab will sometimes retrieve the wrong target, so do not trust it blindly. If tabbing yields the wrong target, pressing tab again will cycle to another nearby target. Shift-tab will return to the previous target.
Macros can also be used in conjunction with your target. To make your target's name appear in the chat window, use the short-hand %t (percent-t). For example, a macro to announce your current target might read "/p My current target is %t."
You can select your target via text commands as well, using /target . If you were a group healer, you might want a macro to target the group's tank, although this is often more easily accomplished using a focus. Other macro commands that choose a target include /targetenemy, /targetparty, /targetraid, /targetlasttarget, and /cleartarget.
Many macros also have a "conditional" in them, which allow you to perform an action on a particular character, and not necessarily your target. For example, a macro that says /cast Flash Heal [target=self] would automatically cast a Flash Heal on yourself, regardless of who was targeted. (It would normally be cast on your friendly target.) See the macro article for more details.