You can use 'row' to describe desks lined up behind each other. Rows can be parallel with the front of the classroom (the front row, the back row). They can also be parallel with the side walls (the row nearest the window, the row nearest the door). You could use 'columns' to describe the kids lined up in the yard. I'd still just use rows though.