layers in this snippet is a standard python list. First of all, python lists are not registered in a nn.Module which will lead to issues. That is way there exist a list-like layer which is a nn.Module.
So imagine layers consist of:
layers=[layer1,layer2,layer3]
and
seq_layers=nn.Sequential(*layers)
Secondly, nn.Sequential  runs the three layers at once, this is, it takes the input, run layer1, take output1 and feed layer2 with it, take output2 and feed layer3 giving as result output3.
So this two blocks of code are equivalent:
x = ... # our input
for layer in layers:
   x = layer(x)

Which for the case would be:
x = ... # our input

x = layer1(x)
x = layer2(x)
x = layer3(x)

but using a nn.Sequential the same code can be called in a single line
x=seq_layers(x)
So nn.Sequential is a construction which is used when you want to run certain layers sequentially. It makes the forward to be readable and compact.
So in the code you are pointing to, they build different ResNet architectures with the same function. They return a nn.Sequential because they can run it without the functions knows “what’s inside”
It consist of 10 layers? it will run these 10, it’s a single one? no problem.