good tip thanks
how do you know when your being targeted though (assuming thats what you mean "interdiction"
Interdiction is where another ship (NPC or player) tries to pull you out of supercruise. If a ship appears to be following behind you, it's possible they are intending to attempt an interdiction. NPCs will also generally warn you - messages like "I'm glad I found you first" in the chat.
Not sure how much of this you know from your experience so far (and I'm on a break from ED at the moment, so I'm reciting this from memory).
Once the other ship triggers the interdiction you get put into the "mini game" as others have said - the two big progress bars left and right and an escape vector target in the middle of the screen. The closer you can follow the escape vector, the more likely you will break the interdiction lock.
The blue progress bar on the left will go up if you are following closely enough and when that reaches the top, you will break the interdiction and you carry on in supercruise. If you are not following closely enough, the red bar will go up and when that reaches the top, you will be dumped out of supercruise with the other ship (who will either start shooting straight away or will demand cargo and then start shooting depending on the situation).
If you zero your throttle while you are in the mini-game then you submit and drop out of supercruise. As
@Kautya said this considerably reduces the recharge time for the FSD and therefore allows you to escape more quickly.
So, if the red bar is nearing the top then it's worthwhile just throttling back to submit.
To avoid the interdiction altogether, the general advice is to avoid heading directly to your destination - for example follow a curving path out of the plane of the system and turn towards your destination as tightly as you can at the end of the run. The idea is to basically try to prevent the other ship from being able to follow directly behind you long enough to trigger the interdiction. This requires manual flying in supercruise as the assist will always go directly in a nice easy to interdict straight line. Depending on the bodies (planets, stars) between you and your destination, this can also be faster than flying directly as it prevents the gravity from the intermediate bodies from slowing you down.
NPC pirates may jump you at any time. If you get a message from a mission giver that there's an "incoming enemy", that means you will almost certainly get an interdiction attempt.
I've never seen it written, but I think that NPC pirates will match your combat rank whereas mission-related interdictors will match the mission rank - so if you take an Elite mission and you get an NPC trying to prevent you finishing the mission they will be Elite rank NPCs. Take that into acount when considering the bonus offered by a mission giver to take out the "incoming enemy".