How does generations work?

So this might seem like a really stupid question, but how are family generations counted? Like is it just the set of kids/siblings or the family as a whole.

For example, in my family, is it me and my partner as one generation and my 2 kids another, making 2 generations, or are we all counted as one, then when my kids have kids, they're the next generation? Like are the parents included in it?

Another example, was I a part of my parents generation when I was a kid now I'm a part of my own with my kids, then the kids pass on the generation to their kids. Does this even make sense? I feel like I'm even confusing myself