Characters that are friendly are on your side. If you hover an NPC that is siding you, their name on their name tag is displayed in green colour. Their target circle, if you select them, is also shown in green.
You can use supportive spells on friendly targets, but no offensive spells. These spells may cast (you can hold down "Shift" to force casting an offensive spell on a friendly target), but they will have no effect.
Outside PvP, players and their pets are friendly to you.
While your pets and guardians are on the same side as you, they will, by default, only use supportive spells on you and your group (but not anyone from a different grouped). This is to prevent other groups from monopolizing your pet's attention. If you would like your pet to use supportive spells on non-partied players, you have to instruct your pet to do so. This is done by selecting that player and then double-clicking the appropriate skill of your pet.
If you are friendly to a faction, you can still attack them if you check the "At War" box on their entry in your reputation window.