A lot of good advice about how to survive an interdiction. So I'll focus on how to avoid it. Ignore the mini-game if you get interdicted just submit, this is how to avoid that in the first place.
First off try to avoid things that make you a target if you can. For instance if you've pledged to a Power just for chuckles then unpledge. Avoid anacrchy systems etc.
There are two things a ship needs to interdict you: 1) it has to be behind you and 2) it has to be closing or not losing too much ground. When you're accelerating away from a mass and they're in the well it's harder for them, if you're decelerating toward a mass then it's easier. That means you should avoid letting ships get behind you and you should be more cognizant when you're approaching a station or planet.
I play in open so I'm more worried about players but it works for NPCs just as well. Here are some screen shots showing how to avoid interdictions. This is in Deciat at Farseer's base which always has some folks in open.
First picture, how not to fly from the star to a base. Notice the blop of contacts at the bottom of the radar (Ridiculously Advanced Detection Anomaly Receiver). That's just asking for trouble.
So to avoid that I tack in one direction till the contacts are 30 degrees or so off my tail. This way they'll have to move much further and much faster to get there. My destination is the planet to my right, targets are behind and to the left.
About halfway there I tack the other way, now targets are behind and to the right and destination is to the left. A note about tacking back. If you just roll and pull to the other side then your tail will cross in front of the target and they can interdict you. Go from side to side in an arc passing above your destination, that way your tail is always 30 degrees or more off the enemy. Nobody's really following me but if they were they'd have a very long way to travel to get back on my 6. I've slowed way down to check out that signal source but I'm at zero risk of interdiction.
Lastly I burn past the target and loop back, now as I'm going in at my slowest and most vulnerable there is absolutely nothing behind me. Zero chance of interdiction.
If you slow to 30KM/s min super cruise speed you can sit all day turning and the NPC will mindlessly zip past you back and forth trying to get behind you. So if you see some message on local chat about wanting your cargo you don't necessarily have to drop out of supercruise. Just slow all the way down and turn to face them (check contacts tab). Just sit there playing cat and mouse with him while you size up his ship type and refine your strategy, then either high wake out, try tacking to your destination like above or just kill him which is usually my goal.
I've loaded out my Asp with 4 small missiles and two cannons so I don't actually mind interdictions. So I tend to fly more straight line to invite them but if I'm injured or out of ammo I revert to this style of flying. I basically never get interdicted unless I'm ready for it.
Always have your PIPs in your intended strategy. You don't want to be messing around with them when things get busy. If you do get interdicted there's very good advice in the above posts about how to deal with it.
Edit: So just now I was returning from a mission to attack a high sec ground base. When I jumped back in and started traveling toward the turn in stationI noticed a contact closing fast, I turned into him and throttled down as he went zipping past. About the time I turned back and scanned him he announced he wanted all my tasty cargo. Since it was an Imperial Clipper I really didn't feel like messing with him so I did exactly what I described above. Tacked the rest of the way to the station with him wandering around on my tail. For final approach I throttled to stop, waited for him to go blasting past and then sedately flew on in and turned in my mission. No interdiction. For extra chuckles he followed me into the station so while I was sitting on the pad counting my money I could see him commenting in local about my need to pay up followed quickly by his dismay at the local security forces blowing him away.
Numbers are just me scrolling some other info off chat.