Line of sight
If you have an enemy within line of sight, you have an unobstructed view of that enemy, and that enemy has an unobstructed view of you. You can target that enemy with a ranged attack, and if you are within range, have the possibility of hitting the enemy. The same is true of that enemy: if a line of sight exists between you and the enemy, they can target you with ranged attacks. If no line of sight exists between you and the enemy, you will get a "target blocked" message if you try to attack from range, even if you have that enemy targeted. For sniper attacks, the enemy must be within line of sight at both the start and the end of the animation.
Breaking line of sight
Breaking line of sight is an important tactic, used especially by melee characters such as tankers, scrappers, brutes, and to some extent stalkers. The basic idea is to force enemies that have and prefer to used range attacks to close to within melee range, by first aggroing those enemies, then breaking the line of sight. The enemy who has selected the character who breaks line of sight must then move to re-establish it to continue to attack. This allows ranged attacking enemies to be repositioned, and gathered into a smaller area. This makes it easier for a team to attack larger numbers of the enemies with Area of Effect and Point Blank Area of Effect attacks. For characters with abilities that scale by having more enemies within range, such as Invulnerability's Invincibility and Willpower's Rise to the Challenge, breaking line of sight allows more enemies to be collected within range of those abilities.
The basic strategy is to use territorial features to break line of sight. The most basic feature of territory used to do this is a wall. Outdoor maps have buildings, dumpsters, and other objects that can be used to break line of sight. Boxes and crates such as are found in warehouse and ship instances can also be used.
Player characters that do not wish to become primary targets of the ranged attacks of these enemies should remain out of sight of them until they have been collected. If an enemy establishes line of sight contact with you while the player who sought to aggro and move them is breaking line of sight, they will switch targets and attack you with ranged attacks. This is typically a result that the person using the breaking line of sight tactic prefers to avoid. By remaining hidden by the obstruction being used, you can make sure that the pulling character remains the enemy's primary target.