A generation can mean any group that is sorted by the time they were created.
In a family, a generation means all the people on one level of a family tree. For example, your brothers, sisters and cousins are in the same generation as you.
In populations of people, a “generation” means groups of people born in different periods of time. Each generation lasts for the average amount of time between the birth of parents, and the birth of their children.