Farflame - Ship combat is not only tied to missions. You can attack any ship. Hostile ships will attack you.
Enemy ships are roaming the entire universe and they are all aligned with factions. When the universe is initially generated at the start of a new game, factions are assigned to each of the million or so systems that are created. Ships launched from those systems have various tasks and roam the universe - anarchy, combat, trade, mining etc.
By default, Raiders, Scavvers, Phage and several other factions are red or hostile. You can see enemy ships as you travel around in systems and their indicator labels let you know if they are hostile, neutral or aligned. Scanning ships provides detailed information about faction, loaded equipment and turrets etc. Nearing any hostile ship triggers combat.
The areas around stations are neutral. For a period of time, after a hostile ship launches, if you are in the vicinity, they will ignore you. Otherwise they will attack. Destroying friendly ships could align you with hostile factions. You can manipulate your current faction any way you want through your actions, aligning with hostile factions or with some of the less hostile factions - its entirely up to you.
If you destroy a ship, you will see your faction standing change based on the alignment of warring or hostile factions in the universe. Factions go beyond space. Taking ground based missions for factions allows you to earn tokens so you can buy legendary and epic equipment from special merchants. I'll be adding this system to space combat (tokens/gear) in a future patch.
You can always escape an attacking enemy ship by engaging your micro-warp drive. Once you are far enough away from a hostile ship, they will return to their previous mission/task.