This is done by using your capacity. Lets use an example to illustrate this.
Say you are a member of a scrum team where there are 8 members , and you are following a two week Sprint.
So initial estimate of every team members capacity is 80 hours i.e. two weeks.
Some of the best scrum teams in the world work at 70 – 75 percent capacity. What that means is in the eighty hours they are at work, they would have to attend to company emails, go to meetings that are required at a company level, take lunch breaks, go on sales call etc. If you have another project then instead of 70 percent you only account yourself at 60 percent capacity. When many teams start with Scrum, we recommend them to start at 50 percent capacity. The other 50 percent accounts for day to day activities in your company.
Say your team is doing 50 percent capacity. That means each person in a two week sprint is only accounted for 40 hours. Out of which if you have a vacation day 8 hours, you take off 4 hours (The rest 4 hours you can account to the fifty percent)
Take a hypothetical example for a two week Sprint of a team at 50 percent capacity ( as this is a fairly new team to Scrum)
This team is made of Charles, Mike, Annie, Bob and Ray . Plus a scrum master. We don’t count the Scrum master’s hours in Scrum, unless they are pulling tasks off the task board .
Mike is there for both the weeks = 40
Charles has one day he is not there = 36
Annie is a part timer and she only works three days a week. So her capacity is 24 hours
Bob = 40
Ray = 40
Team Actual Capacity = 40 + 36 + 24 + 40 + 40 = 180 hours.
If the team worked all the two weeks at 100 percent capacity the would have a capacity of 8 hours a day * 10 days in a sprint * 5 team members = 450 hours.
See the difference of what is used in Scrum and the theoretical 450 that now one can work. That is what provides the cushion and allows for the team to provide a sustainable pace in every Sprint.