Here’s a great guide about macros.
Here’s an example of how to create a simple macro that allows you to tab target only enemy players and not their pets.
Step 1: Copy the following two lines.
Step 2: In chat type /M to bring up the Macros interface
Step 3: Click on the New button
Step 4: Type in a name such as “targetplayer” then click on Okay
Step 5: Click inside the blank window and paste the two lines you copied in Step 1
Step 6: Click on the Save button
Step 7: Drag the icon from the Macros interface onto your action bar. I put it on my Tab key. Whenever I hit Tab it will target the next closest enemy play and not their pet.
The Skill-Capped and Arena Junkies guides usually include recommended macros. Icy-Veins also has them. Plus a Google search will find a lot more.