without going to in depth, as it may give information to any competitors (real world) the gist of what happens in most yards is this. train pulls into a receiving track, cuts power off and takes it to wherever (service track, tie up track, etc) as train comes in, it "drops" into a yard track for the switcher to be able to get a list on. once a list is obtained, the crew marks it according to block (ie:north, south, east, west, industry, etc) while this happens, at bigger yards the carman bleeds the cars off and inspects them. at smaller yards, the brakeman/utility man bleeds them off in preparation to be switched/shunted. for this I will make an example using the

orth, (s)outh, (e)ast, (w)est.
train: 15 cars, blocks mixed you must sort and arrange all blocks (blocks meaning destination)
sequence: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
block: n n s e w s n e e e w n s s s
track: 1 1 2 3 4 2 1 3 3 3 4 1 2 2 2
as you can see, all norths go to 1, all south go to 2, etc etc
This is the basis for most switchlist, you obviously wouldn't want a car that is supposed to go to new York going to California. any questions feel free to ask =)
Brian