There is a heated controversy as to what Wittgenstein tried to achieve in the Tractatus and whether he achieved it.
Wittgenstein's own retrospect of the book is rather ambivalent, see Kuusela's Development of Wittgenstein’s Philosophy for a review. In a 1936 manuscript he writes "Language is much more complex than logicians and the author of the Tract. Log. Phil. have imagined", and in the preface to Philosophical Investigations admits that he was "forced to recognize grave mistakes in what [he] wrote in that early book". But, on the other hand, he says that Philosophical Investigations "could be seen in the right light only by contrast with and against the background of my old way of thinking".
Tractatus itself is somewhat cryptic about its aim, which is sketched in the famous passage that apparently also says that Tractatus is "nonsensical":
"My propositions serve as elucidations in the following way: anyone who understands me eventually recognizes them as nonsensical, when he has used them - as steps - to climb beyond them. He must, so to speak, throw away the ladder after he has climbed up it."
But on this too Wittgenstein changed his mind by early 1930s:
"I might say: if the place I want to reach could only be climbed up to by a ladder, I would give up trying to get there. For the place to which I really have to go is one that I must actually be at already. Anything that can be reached with a ladder does not interest me."
This sounds more like "philosophy leaves everything as it is" from Philosophical Investigations.
As for the role of "nonsense" in accomplishing Tractatus's goals, there are two major competing readings. They are surveyed in Kuusela's Nonsense and Clarification in the Tractatus – Resolute and Ineffability Readings:
"Ultimately, Hacker’s view of what nonsense in the Tractatus is meant to convey is, in a way, very straightforward. The book contains an argument which leads the reader to realise the nonsensicalness of what is said in the book. More precisely, the book contains a theory of representation (the picture theory of proposition) from which it follows that formal properties of symbols cannot be talked or thought about and that a theory of types is merely not necessary, but impossible. Consequently, many remarks in the book, i.e. those “talking” about the formal or necessary features of language or of the world, are nonsense. However, it does not follow from this, in Hacker’s view, that such remarks could not convey truths of some sort to us. Rather, the theory and the line of argument are what constitutes the famous ladder of the Tractatus."
In Hacker's own words, "what someone means or intends by a remark can be grasped even though the sentence uttered is strictly speaking nonsense... there are, according to the author of the Tractatus, ineffable truths that can be apprehended." However, Wittgenstein's own remarks in the Tractatus and afterwards undermine the idea that he would accept that there are such things as "ineffable truths" or "nonsensical arguments". The resolute reading, put forth e.g. by Conant, and shared by Kuusela himself (with some amendments), goes like this:
"First, instead of providing us with a paradoxically nonsensical doctrine the Tractatus aims at demonstrating that the clarification of philosophical problems requires a particular approach to philosophy, which differs importantly from how philosophy has been traditionally conceived. More specifically, according to Wittgenstein, philosophers have made a mistake in treating statements concerning the essential, i.e. necessary features of things as if they were simply another type of statements of fact... Accordingly, one important aim of the Tractatus’ nonsense (as emphasized by Conant and the resolute readers) is to show case by
case how attempts to put forward statements about such necessary features of things dissolve into nonsense... Contrary to what has been traditionally assumed, philosophy is not in the business of stating facts or making true/false statements about things (including language)."
In other words, on this reading there are no ineffable truths hinted at by nonsense, there is only confusion as to what sentences of certain type express. And it is not that something "there" is beyond expression, but trivially there is no "there" there to express. And the concept-script of the Tractatus is supposed to transition us into a new language where the offending sentences are not even utterable (the place where the "ladder" leads). Carnap will later be far more direct, and aggressive, on this in Elimination of Metaphysics, where he characterizes "metaphysics" as "meaningless". But it is his directness that got him in trouble, for it was pointed out to him that his critique of metaphysics is itself "metaphysical" in his own sense, and therefore meaningless. Perhaps, Wittgenstein knew better:
"The correct method of philosophy would really be the following: to say
nothing except what can be said, i.e. propositions of natural science – i.e.
something that has nothing to do with philosophy – and then, whenever
someone wanted to say something metaphysical, to demonstrate to him
that he had failed to give a meaning to certain signs in his propositions."