Noob question (I just got the game). Should I get involved in fights on the open world?

Just met with the Ripperdoc, and was wondering around for a bit. Suddenly stumbled unto a gunfight between some npc and the cops. Tried to help the cops and kills the npc, but then the cops start going after me.

What should I do? Just let them fight it out and loot after, or join the fight and run away after?