yup.. relay got 4 connection points and sometimes 5. Say points A, B, C and D. Within the relay, A to B is connected and C to D is connected. The way relay works is that if there is a current running from A to B, then relay would connect C to D. If no current running from A to B, then relay would not connect C to D (of course there are many types of relay in the market with diff functions but this is the most common kind used). So actually the relay acts as a switch. The way to connect to HU would be:-
A - Original power cable for ur HU
B - Grounded
C - Direct 12V tap from battery
D - Connect to HU 12V input
So, going back to the above example, then u turn ur ignition to accessory position, the power to A would come ON and since B is grounded, there would be a current flow from A to B. With this current flow, the relay would now connect C to D hence ur HU would power ON....