Quote:"They told the professor that they had got a flat tire on the way back"
A diagram of the sentence would look something like this:
Main Clause
THEY = subject
TOLD = verb
THE PROFESSOR = direct object (of the verb "told")
Subordinate Clause
THAT = relative pronoun
THEY = subject of subordinate clause
HAD GOT = verb of subordinate clause
A ... TIRE = direct object (of the verb "had got")
FLAT = adjective (modifying "tire")
ON THE WAY BACK = prepositional phrase