I'm just learning, but as far as I understood, first thing is you need the pinout of your own arduino. For example in my case I have arduino nano.

As you can see, there are numbers in purple, which you can use. As much pins you have available in your arduino, more pins can you test in your target board at the same time.
So you can write a code like this:
byte pins[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 11, 12, 13, 14, 15, 16, 17, 18, 19 }; char * pinnames[] = { "DIG_0 ", "DIG_1 ", "DIG_2", "DIG_3", "DIG_4", "DIG_5", "DIG_6", "DIG_7", "DIG_8", "DIG_9", "DIG_10", "DIG_11", "DIG_12", "DIG_13", "DIG_14", "DIG_15", "DIG_16", "DIG_17", "DIG_18", "DIG_19" };
However, there is a problem with this. The number of combinations is huge and probably in the target you have an idea about which one 6 pins can be the JTAG interface.
So you can simplify using the minimun number:
byte pins[] = { 0, 1, 2, 3, 4, 5}; char * pinnames[] = { "DIG_0 ", "DIG_1 ", "DIG_2", "DIG_3", "DIG_4", "DIG_5" };
In both cases you need to plug all the pins registered in the arduino to any of the suspected pins in target (in first cases, maybe some of the 20 pins are empty).
Then you need to connect to serial port to the JTAGEnum program and after scanning (command s) you should get the results of the tests (if any).
If you found a JTAG, the program will will tell you which pins in your arduino match with the identified JTAG pins.
For example:
FOUND! tck:DIG_0 tms:DIG_1 tdo:DIG_2 tdi:DIG_3
So you can follow the DIG_0 to know which one is tck in the target, ...
I'm sorry if I dont explain very well myself and I hope this can help