I left the teamfights out simply because it mostly depends on your team composition but I could give you some general pointers, again it depends mostly on experience.
If you go a Tank (Heavy CC, moderate to low damage) in one of the lone roles (Top or Jungler) you will be either peeler/defender, initiator or zoner or some combination of it. Peelers should stay close to the carries and CC anything that comes towards it, meat shield skill shots and be quite careful about assassins. Initiators will take the front line and start the engage with their CC, they normally stick to the bulk of people, who you auto attack won't make much difference but your CC must be focused towards the key enemies. Zoners will break out teamfights, this one is probably the hardest one to explain but basically you want the enemies carries to focus on you at the same time you take as little damage as possible, extending the duration of the teamfight. You basically want to break it into a 1/2v4 (enemies assassins/initiators versus your teammates) and 1v4/3 (you versus the carries) again your focus is mostly on survival, keeping the enemies carries away from your own.
In general most of the games you will want to initiate (if possible) and then zone out the adc and apc until your team thin the enemy lines.
Tanks on support lanes can do the same but generally they are better as peelers protecting they adc so he can put the damage.
Bruisers will go either assassin, initiator and in rare cases peeler. They normally do a bad job at zoning since they have to sacrifice some resist to get some damage that they need. Ideally you want to go in, CC the enemy team get a kill and then go out. However if your laning phase was bad or simply your team lacks a peeler they can also stay on the backlines and do the support job letting someone else carry the initiator job.
It all boils to team composition so you will have to get the hist by practice. If you are the only tank then you are most likely want to zone, if theya re more than one then you may want to stay back and protect (assuming someone else has a better engage).
For example take than in your team there is a Gnar Top lane, a random mage, a random adc, a leona and you went rammus. Out of the 3 your initiation is the worst so you most likely will let either Leona or Gnar initiate and you stay on the back line taunting anything that comes close to your carries. If for example you have top garen, jungle sejuani and alistar support, teh one that should initiate everytime should be sejuani. If you have garen, sejuani and leona then either leo or sejuani has to initiate and the other one has to be a peeler.