Almost none of this is written down anywhere in official court rules but there are some widely adopted standards for this practice.

Most courts require that only one lawyer be in charge of speaking at any given stage of the trial. But, it wouldn't be unusual, for example, for one lawyer to question most of the witnesses and for a different lawyer who is more familiar with the specialized subject matter in question (e.g. electrical specifications), usually a junior lawyer, to question the expert witnesses in a case.

Also, if the usually designated lawyer is absent for some reason (stuck in traffic, sick, etc.), the "second chair" lawyer can (and is often required to) take over the case for the client until the "first chair" lawyer is available again.

Mostly, second chair lawyers (I've spent plenty of time over the years in this role) do the following (a non-exclusive list):

* take notes, 

* pay attention to how the judge and jury are reacting to testimony, 

* provide input into jury selection decisions,

* reminds the primary lawyer of points that still need to be covered in the examination of a witness,

* reminds the primary lawyer of exhibits that still need to be formally offered into evidence, 

* scrambles to find rebuttal or impeachment evidence for unanticipated testimony,

* prompts the primary lawyer to make objections if the primary lawyer was paying attention to something else, 

* identifies and has at the ready exhibits needs to present (or to follow the other side's examination), 

* looks up points of law that are relevant or will need to be referenced that come up during trial, 

* handles logistics for witnesses who are not on the stand (keeping them in the hallway if the witness is sequestered, trying to obtain the appearance of no show witnesses or reshuffling their order, saying thank you to witnesses who are no longer on the stand, etc.), 

* carries some of the litigation team's stuff into and out of the court room,

* provides informed commentary and suggestions during breaks and working lunches, etc.

Also, in addition to the usual "first chair" and "second chair" roles, often supplemented by a paralegal or legal assistant, there is a different kind of arrangement in which different lawyers for the same person can fully participate. This far less common arrangement happens when the person showing up in court is wearing "more than one hat" and has a different lawyer in different capacities. 

For example, suppose that someone is the President of a corporation and both the corporation and the President individually are both sued. There might be one primary lawyer for the corporation and one for the President personally, and both lawyers might participate fully.