If you attempt to use a harmful power on a friendly target or a helpful power on a hostile target, you will automatically use that power on your target's target instead, if it has one and if this secondary target is legal for your power and within range. The game does not move your targeting selector to the new target.
This feature is often used with ranged attacks by Blasters or Corruptors in PvE teams with a Tanker or Brute, to guarantee those blasts strike the same enemy that that tank is taunting. Assisting can also be used in PvP to ensure a coordinated attack on a single enemy. These techniques are also known as "attacking through" someone.
Assisting can also be used to automatically use a protective or healing power on whichever teammate a certain enemy is focused on, without needing to guess who that is or waiting to see who gets hurt.
Assisting does not allow you to use targeted powers on yourself or on an enemy that has too much Stealth for you to see.