Frege's article, "On Sense and Reference," is pretty complex. Don't worry too much about the last part starting around p. 33 where he gives lots and lots of examples of sentences with subordinate clauses (but do read it!)
Frege is suggesting two puzzles: the Identity Puzzle and the Propositional Attitude puzzle
The Identity Puzzle: how can there be true, informative identity statements, in particular, how can it be that "The Morning Star = "The Evening Star" tells us something about the world rather than merely rehearsing the trivial logical truth that The Morning Star, like everything else, is self-identical?
The Propositional Attitude Puzzle: how come substituting expressions that name the same thing into some contexts doesn't preserve truth value? How come, for example, does substituting "Samuel Clemens" for "Mark Twain" (Samuel Clemens' pen name) in some sentences, change their truth value?