What does it mean for a number to be in a set? Frustratingly my book gives me several examples of a number in a set but offers no explanation at all.
Anyways what is going on here? According to the book $2$ is not an element of these sets:
$$\{\{2\},\{\{2\}\}\}$$
$$\{\{2\},\{2,\{2\}\}\}$$
$$\{\{\{2\}\}\}$$
What is going on? Clearly $2$ is in all of those sets. Or are they saying that $2$ isn't in any of these sets but a set is in all these sets and in that set is $2$? Which really seems like a logical fallacy because $2$ is in those sets contained in a set means the set has $2$ even if it is behind a layer of sets.
For example you wouldn't say that there are no cars in a neighborhood if all the cars in in a garage, so why does math take this approach?
 A: You can think of 'is an element of' as stripping off a single layer of set braces.
$2$ is not an element of $\{\{2\}\}$, because removing one layer of braces, you get $\{2\}$, the set containing $2$, which is different from $2$.
Also, if this wasn't the case, then there would be no way to distinguish between, for example,
$$\{\{2\}, \{2,3\}\} \text{ and } \{\{2,3\}\},$$
which are clearly different sets, even though each of their elements only contain $2$s and $3$s.
A: It might be a good idea to start with something maybe slightly more basic:
What is the difference between these two things: $\emptyset$ and $\{\emptyset\}$.
The first is just the empty set (which has no elements)
The second is a set with exactly one element - which is the empty set.
Think about this for a while, and it should become clearer.
A: When we say "$2$ is in a set," we mean that $2$ is an element of the set. In the first case, there are exactly two elements of $\{\{2\}, \{\{2\}\}\}$, namely
$$\{2\}$$ and $$\{\{2\}\}$$
In general, one can find the elements of a given set by erasing the outermost braces.
Neither of these are the number $2$; the first one is a set containing $2$ as an element, and the other is a set containing the set $\{2\}$ as an element.
If we wanted to have $2$ be an element of the set, we'd need either $2 = \{2\}$ or $2 = \{\{2\}\}$, neither of which is true.
A: 2 is not an element in these sets 
the set containing the element 2 is the element in 1 and 2 
remember you must have an independent 2 in the elements for 2 to be part of the set as an element  
A: Here is a non mathematical explanation in case it helps.
Think of a Russian Doll.
There are two ways of thinking about what is inside the outside (largest) doll. Perhaps the most obvious is to say "all the little dolls". But when a child opens the first doll, all they see is the next one "there's another doll inside".
When we are dealing with sets, we say $x\in X$, if we see $x$ when we take the first layer off and look inside. There may be other things to find, but they are buried deeper, and can only be found if we are allowed to take more layers off.
A: It's an interesting question you raise.
Practically speaking, we (as mathematicians) would never run into this problem because we never mix numbers and "sets of numbers", or different types in the same collection (edit from comment: set theory does this, so this comment is about "higher levels" of abstraction in mathematics than set theory) 
Anyway, we would prove statements of the form: "Let $\mathcal{S}$ be a collection of sets. Then for $S,T \in \mathcal{S}, \ldots$", etc.  As a sanity check, you would be sure that $\mathcal{S}$ would not contain a single number, and so mathematically we wouldn't say that $2 \in \mathcal{S}$ even if one set of $\mathcal{S}$ contains $2$, right?
Even to disambiguate "sets of sets" from sets, we use the term "collection of sets".
That being said, this concept is very important when you go to computer science because you really need to keep such structures straight, they are used to organize data (lists of lists, etc). There you might run into the same question of, "how do you determine if $2$ is in my structure or not", but that is a different question entirely.
A: Part of your confusion comes from using the preposition "in" to designate set membership. In everyday use "in" is a transitive relation: I am in my house which is situated in my home town, so I am in my home town. However sets are defined by what are their members, and it would be very restrictive to consider only sets for membership is transitive: whenever $x$ is a member of $y$, it would be impossible to construct a set that has $y$ as member without also including $x$ as member (as well as any members that $x$ might have, and so forth). So instead whenever $x\neq y$, the questions of whether some set$~S$ has $x$ as member and whether $S$ has $y$ as member are completely independent.
There is a different, though related, notion that is transitive: the subset relation (inclusion). The integers include the even numbers, which include the set $\{4,144,1026\}$, so certainly the integers include the set $\{4,144,1026\}$. By definition $X$ includes $Y$ is every member of $Y$ is also member of $X$. Confusingly "contains" can refer both to membership and to inclusion, but they are quite different relations; in practice it is almost always clear which meaning of "contains" is meant in any concrete situation where it is used.
In fact in everyday life membership is not a transitive relation. My sister's left arm is not a member of my family, although it is a member of a member of my family (excuse the bad pun, but it is not so easy to find an everyday example of a collection of sets; one might think of something like an association of sports teams).
A: The elements of the set $\{\{2\},\{\{2\}\}\}$ are $\{2\}$ (which is a set, not a number) and $\{\{2\}\}$ (which is a set that contains another set, but it's not a number). The same for the other two sets. Even if the elements of your sets are sets that contain number 2, they're not number 2, so this sets don't contain 2 as an element.
A: Let's not over-think this too much, unless this is your homework for real or complex analysis or something like that.
{2} != 2
just as A != B
If you would say that C contains A, that doesn't leave you to say that it either contains B also, or B alone.
There was another angle I thought of.  
Suppose that the 2 references the end of an open interval, say from 0:2.  Open intervals do not contain their limit points. Thusly, that interval would contain all fractions up to but not including 2.
I doubt that is the case.  From what you are asking, you have simple answer to give.  Evan said it.
A: 
For example you wouldn't say that there are no cars in a neighborhood if all the cars in in a garage, so why does math take this approach?

There's a difference between a car parked on a street and a car parked in a garage. It is often useful to be able to tell the difference.
For the sorts of things we use sets for, we almost always want to be able to tell the difference. For the rare times we don't, we speak of the "transitive closure".

What you have in mind is a partition of a set, rather than a set containing other sets. A partition of a set $X$ is a family of subsets $P_i \subseteq X$ such every element of $X$ is in exactly one of the $P_i$'s. This is the sort of thing you have in mind: you are imagining each garage to be one of the groups in the partition, the street to be another group, and so forth. And when you take their union, you get "the set of all cars in the neighborhood".
A: I remember that my professor used this analogy before:
Think of the set $\{\{2\},\{\{2\}\}\} $ as the folder that contains 2 folders. The first folder $\{2\}$ contains a file called $2$ and the second folder $\{\{2\}\}$ contains a folder that contains a file $\{2\}$.
There might be some computer problems with this analogy, as I think a file is determined by its location as well. However, I think this will give you a better feeling for what's going on.
