Something white belts at the beginning of their journey will say is "What am I supposed to do in my opponents guard?".
A fair question with a multitude of answers, however primarily the first and most pressing issue is that you are comfortable within their guard.
A strong base and aligned center of gravity is paramount in ensuring that you are not giving away any undue advantage to your partner.
(Elbows in, head high, solid base)
"Gorilla back" is the phrase most often overheard in gyms with white-belts going hell for leather. The Gorilla back is a postural position in which the spine is in it's most strengthened alignment, with the chest out and the pelvis with a slight forward tilt that engages the core.
Like a Gorilla, duh.
An important detail is to not rest on the balls of the feet and to lay the toes nail side down so that the body is not unintentionally leaning forward, making you more susceptible to have your balance manipulated, thus easier to sweep. At this point of your Jiujitsu journey we don't want to make things any easier for your guard playing partner.
(Keep your toes on the mat!)
So to answer the initial question of what to do in your opponents guard, firstly be comfortable and always remember;
If they can tip you, they can sweep you.
If they can sweep you, they can tap you.