There are 2 factions, Rebel and Imperial and neutral. You can be on leave, combatant or special forces.
On leave is basically the same as being neutral where nobody can attack you and you can't attack anybody. However you could get scanned by NPC guards or a wandering probe droid and reset back to your original status whether that was combatant or special forces.
Combatant is no PVP. You can attack NPCs of the opposite faction only and they can attack you. Other players cannot attack you and you can't attack them.
Special forces is PVP enabled. Everybody (players and NPCs) can attack you and you can attack everybody.
This replaces the old system of overt and covert. Basically special forces is overt and combatant is covert. You do still get TEFs (temporary enemy flags) where you can't enter buildings and such until they wear off.
If you are special forces or a combatant you can go on leave so you can party and quest with your friends of the opposite faction. Or if you just don't want to be attacked by the guards every time you want to go to the bazzar or cantenia.
You can also duel other players by using the radial menu and selecting duel. Both players must accept the duel in order for it to be activated. So nobody can come up to you and kill you if you are not special forces and didn't accept a duel. In that way it makes PVP completly consentual.
The only place where this is not the case is with jedi. If a jedi is on the BH terminals, any BH can take the mission and attack him at any time. This will continue untill the jedi is off the terminals. If he wants to know if he is on the terminals or not, he needs to get a friendly BH to check for him.