In the sentence: Long ago, builders erected the Great Wall of China to keep out invaders, in which the underlined word is the "Great Wall of China", it specifies the direct object.
Direct objects can be nouns, pronouns, phrases, or clauses. If you can identify the subject and verb in a sentence, then finding the direct object—if one exists—is easy.