One word: Scutmonkey!
Seriously, though, your primary goal is to learn as much as you can about whatever field you're rotating on.
As for your specific role, it really depends on what service you're on. On pretty much all the inpatient services, you are expected to take a primary role in the care of patients assigned to you. In most cases, this involves doing the admission H&P, sometimes writing orders that your residents will cosign, and rounding and writing SOAP notes on your patients every morning. Often you will have more time to spend with your patients, so you may be able to tease out some information that the residents simply don't have time to talk to them about.
On outpatient services, at least here, we are expected to see the patient, do a focused H&P, formulate an opinion if you can (sometimes you have no frickin' idea) then present to the attending. Then together you decide on a plan. Then on IM at least, we were expected to go back in and explain the plan to the patient. Of course, this varies by preceptor.
On surgical services, including OB/GYN at least to an extent, we are more of an observer. In the OR, they will probably let you cut suture, will definitely have you retract, and may let you help with closing or operate the camera on a laparoscopy. If you're really good, they may let you first assist on something simple. Of course, this REALLY depends on the surgeon. Some are happy to get students involved, others HATE students and want you to be quiet and out of the way. OB/GYN is a little different from surgery, though, in that it has a significant outpatient and non-surgical component to it.
Disclaimer: DO NOT expect to know how to do all this stuff. That's why you're a third year. If you're on the ball, you'll pick the skills up fairly quickly, just in time to finish the rotation and into something completely different!