In most circumstances, you can't roll multiple attempts for the same action—recalling a piece of knowledge, sweet-talking the castle guard, pushing a heavy boulder aside, etc. But you can work together with your allies to make that one attempt as successful as possible. Normally this is covered by the Help Action (which grants the player making the roll Advantage). Multiple instances of advantage can’t stack, however, which leaves additional characters wanting to help in the awkward position of either doing nothing, or simply contributing in the fiction without providing any mechanical benefits.
With Teamwork Actions, anyone with a relevant skill or background may help another character attempt something—the first person grants advantage (per the Help action) as normal, and every additional person grants the primary actor a +1 bonus. If the roll fails, however, everyone involved is liable for the narrative consequences, if any.
This rule is meant to be used in normal Adventuring and Exploration situations. Teamwork cannot be utilized during combat or on attack rolls. This rule assumes the action that requires Teamwork is one in which only some of the party is involved. Situations where every member of the party present in the scene is involved in the effort or acting in the same manner—such as attempting to move stealthily past a group of enemies—are likely better handled by Group Tests, adjudicated on a case by case basis by the DM.
If the group is using the optional rule for Boons & Banes instead of the normal Advantage & Disadvantage rules, instead of a +1 bonus to the roll for each additional actor participating in the Teamwork Action, consider giving the primary actor +1 Boon to the roll. This way the primary actor has an increased chance of achieving the maximum possible result on their additional 1d6.