I'll do my best to give you answer for both your questions.
First off, when it comes to dealing with pressure from drivers that are behind you, the main thing is to try and maintain focus with what is ahead of you. You always want to be looking out for your braking points and making sure you hit consistently. If you do that, you're already making it much more difficult for the person behind you to attempt an overtake. I've spoken to quite a few people about this who have the same issue, and it seems like the biggest problem is they get too focused on the person behind them. You should only be glancing into that rear view mirror every once in a while. What's important is that you get around the track as fast as you can,and that means you focus on your braking points and cornering. If constantly look back at the car behind, I guarantee you will make a mistake faster than you can blink. Dealing with pressure is all about remaining poised. If you stay calm and make a conscious effort to do those two things, you'll already be better under pressure.
Not to harp on anybody or anything, but I definitely notice some very odd behavior from some cars when I'm behind them. Like I said, focus on what is ahead, only changing focus when the person behind you does make a move.
As for defending, this is something you'll get better at with practice. There's a few things you're allowed to do when defending along with some rules. The first and number one rule however is,
you may make one move and one move only, reactionary moves or double moves are not allowed. As an example, say you're coming up to a right hand corner, and the driver behind you is close enough to make a move, you can move your car to the inside line before the corner and protect that line from the other driver. You are allowed to return to outside line if you wish, but you may only do so, so long as you keep one car width between you and the edge of the track. This is so you still allow some space to the attacking car otherwise this would be considered a double-move and therefore "blocking".
If someone is trying to pass you on a straight, you're allowed to use the complete width of the track to defending. If you notice the car behind is trying to make a move, you can drift your car to the lane which corresponds with the inside of the next corner, however, once again, once you made this move, if you do return to your original line, you must still allow a full car width between you and the track so as to allow space for the attacking car.
These are just high-level basics, but I'd highly recommend reading this article that talks about attacking and defending techniques.
https://f1metrics.wordpress.com/2014/08/28/the-rules-of-racing/