With a standard action, you can make an attack against any opponent within the attack's range. This is the basic use of your attack bonus.
Shooting or Throwing into Melee
If you make a ranged attack against an opponent engaged in melee with an ally, you take a -4 penalty on your attack roll because you have to aim carefully to avoid hitting your ally. Two characters are engaged in melee if they are opponents and adjacent to one another. (An unconscious or otherwise immobilized character is not considered engaged unless he or she is actually being attacked.)