The medic's main role in tf2 is keeping his other teammates alive. This stays true in the world of friendlies as he will usually flee follow around these friendlies and constantly heal them. In tf2, this action is known as "pocketing".
Gear[]
Gear usually doesn't matter, though there are some preferred ones. The stock medi-gun can be great as the Ubercharge makes the patient invulnerable. The quick-fix can also be good because it heals much faster than stock. The vaccinator is also a decent, but less common pick for anti-sniper tryhards, with its anti quickshot and quick ubers.
Actions[]
You generally only want to do one thing as a friendly pocket and that is keeping your patient alive. It is very common for people to attack the friendlies so defending them is a good idea.
Behavior[]
I recently have used the mannbulance to show I am Friendly.