While there are many tips for preserving your guard - don't let an opponent control your knees, get an angle on you, press your legs down, etc. - there is one that I frequently see beginners not applying properly. Head control is critical in retaining guard.
You see, as an opponent passes their head will generally go to one side and they will move their hips to the same side to reach side control. If they are smart they will control your legs and/or hips to prevent you from hip escaping away. But if you properly control their advance you can totally prevent the pass.
As your opponent starts passing to the right, push his head in that same direction. That will both create a large amount of space between you but also not allow him to progress into side control. You don't have to be rough and go MMA on him, but you can be firm with a palm to the cheek or a forearm to the neck.
As you push on his head, shrimp out in the opposite direction hard. You'll use your hips and legs way more than your arms; pushing his head is more about controlling his position to allow you to escape. After you've achieved enough distance, re-center yourself and put him back in your guard. Depending on his progress and control over your hips/legs, you may need to hip escape more than once. Just be ready for whatever happens and adjust.
Remember that learning all of these little jiu jitsu tricks takes time and you have to patiently learn them and apply them. Practice them, get good at them, and consider it one more tool in your BJJ belt of goodies.
Signup to receive regular tips and tricks from Draculino that'll take your BJJ game to the next level. Learn about the proper mental approach, filling your knowledge gaps, and other details that make all the difference.