Lines are sorted character by character, starting at the first character in the line. You can also sort the contents of a file on a specific part of each line.
Each line of text is a series of fields -words and other characters- serparated from each other by a delimiter character -the spaces between the words.