Pitstops in F1 are the fastest in the world and one of the reasons for that is the big pitcrew, consisting of almost 20 mechanics. This is their job:
3 people are responsible for each tyre. One to take the used one off (red), one to put the new tyre on (orange), and one wheel-gunner to screw them loose and tight (yellow). One of the the mechanics at the front has an indicator on his arm to indicate the position of where the wheel should stop, to make it easier for the driver.
2 people at the sides stabilise the car by holding the side of the car (green). The front- and rear jack lift up the car in the air. There are generally two of them as backup. The front jack (light blue) has the biggest risk of getting hit by the car. The rear jack (dark blue) is the only member who still has to walk to his position when the car is in the pits.
2 people are responsible for the front wing. They change the setup when needed, and change the frontwing in case of damage. A fire extinquisher should always be ready in case of a fire, despite the risk being very low without refuelling nowadays.
There's always a traffic spotter on the lookout to prevent giving the car a green signal while another car is passing. Each wheel-gunner needs to press a button to indicate their tyre is changed correctly. Once all buttons are pressed, including those of the spotters, the light turns green and the driver can exit the pits.
In- and outlaps take a little longer than a normal lap, because they drive through the pitlane instead of the straight. Those laptimes are therefore quite irrelevant when analyzing pace.