There are several methods of targeting enemies/allies. One way is using the Tab-key to cycle through the targets and the Shift+Tab-key to cycle through them in a reverse order. But, there are also more direct keys to select certain targets, like:
  • Cycle Through Enemies (Nearest to Farthest) -> Tab
  • Cycle Through Enemies (Farthest to Nearest) -> Shift+Tab
  • Target Self -> F1
  • Target Members in Party List -> F2 - F8
  • Target Pet/Familiar -> F9
  • Target the Target of Your Current Target -> T
  • Target Focus Target -> F10
  • Target Nearest Enemy -> F11
  • Target Nearest NPC or Object -> F12
  • Cycle Up Through Enmity List -> Ctrl+NUM8
  • Cycle Down Through Enmity List -> Ctrl+NUM2
  • Cycle Through Alliance List (Forward) -> Ctrl+NUM6
  • Cycle Through Alliance List (Backward) -> Ctrl+NUM4

Next to that you also have the following 3 keys to assist you with targeting:
  • Face Target -> F
  • Set/Clear Focus Target -> Shift+F
  • Target Filter -> X *

* When pressed, the target filter will render players, NPCs, enemies, or objects untargetable according to your settings. Although disabled by default, it can be enabled by checking the box for "Enable target cycling" on the Filters tab under Control Settings in the Character Configuration menu.

Personally i limit my targeting to the Tab and the Shift+Tab keys and use my mouse to select specific party members within the party list.