The first two propositions of the Tractatus—"The world is all that is the case" and "The world is the totality of facts, not of things"—define what Wittgenstein means by "the world." A complete description of the world is not given by a complete catalogue of all the things in it, but by a complete catalogue of all the facts that hold of it.
The most basic kinds of facts are "states of affairs." These states of affairs are so simple that their truth or falsity has no bearing on the truth or falsity of any other state of affairs (1.21). When we think of more complex facts—for instance, that I have the only set of keys to the house in my pocket—we realize that their truth or falsity affects the truth or falsity of other possible facts—for instance, whether my sister will be able to get into the house, whether my pocket is full, whether my house is safe from burglary, etc. These more complex facts are composed of a number of basic states of affairs, which in turn are mutually independent. The sum total of true states of affairs (all that is the case) is the world.
Facts exist in what Wittgenstein calls "logical space" (1.13). Logical space is effectively the realm of everything that is logically possible. For instance, though it is not true that Toronto is the capital of Canada, there is nothing illogical about supposing that it might be, so its possibility exists in logical space. Some items in logical space (for instance, "Ottawa is the capital of Canada") are true, while some items in logical space are false. True or false, everything in logical space is possible. "Love is purple" is not an item in logical space, because it is not logically possible (love is not the kind of thing to which we can ascribe a color).
A state of affairs is a combination of objects (2.01). Every object has a logical form (2.0141) that determines how and in what kinds of states of affairs it can occur. Wittgenstein would not consider "love" to be an object, but it may help us to take it as an example. "Love is purple" is nonsensical because we cannot ascribe a color predicate to "love." The logical form of "love" dictates that it can occur in certain ways in certain sentences ("love is the opposite of hate") but not in others ("love is purple").
The logical form of an object does not determine which states of affairs it occurs in, but it does determine which states of affairs it can occur in. We do not know an object unless we know its possible occurrences in states of affairs (2.0123). To return to the earlier example, we don't know what the number two is if we say it is purple.
There is a branch of metaphysics called ontology that is dedicated to figuring out what sorts of things there are. The opening propositions of the Tractatus are devoted to ontological questions. Wittgenstein is categorizing what sorts of things exist, and what relationship they hold to one another.