Definition of Mapping Cylinder and Cone I think I understand the idea of the mapping cylinder and cone, except that I am confused about what is, and is not, included.
Specifically suppose we have a CW complex X and a CW subcomplex A; in other words, a CW pair (X,A).  Let Y denote X without A joined, and consider the associated mapping cone (or cylinder) that joins A to Y in order to form X.
My question is this: Is all of Y included in the mapping cone/cylinder, or just the part that A attaches to?  Is X a subset of the mapping cylinder or cone?
The confusion arises in my mind because in the second illustration on p2 of Hatcher, he clearly indicates that if one object is joined to a second object, all of the second object is included in the mapping cylinder (or cone).
But, on the top of p14 we have a CW pair (X,A), and Hatcher refers to the union of X and CA, where CA is the mapping cone that attaches A to X. But such a union is always just CA according to the illustration on p2, so his equality reduces to X/A=CA/CA, which makes no sense because CA/CA is just a point.
So, from my perspective, there is a problem either way. What am I missing?
 A: On p.2 Hatcher defines the mapping cylinder $M_f$ of a map $f : X \to Y$ as the quotient  space of the disjoint union $(X \times I) \sqcup Y$ obtained by identifying
each $(x,1) \in X \times I$ with $f(x) \in Y$. The mapping cone $C_f$ of $f$ is defined similarly on p. 13.
For a CW-pair $(X,A)$ we consider the inclusion map $i : A \to X$ and can form the mapping cylinder $M_i$ and the mapping cone $C_i$. The latter is $X \cup CA$, where a little bit laxly $[a,0] \in CA$ is thought as the same point as $a \in A \subset X$. This means $X \cap CA = A \subset X$.
Perhaps your confusion comes from the fact that the mapping cylinder (cone) is defined for maps $f : X \to Y$, but for CW-pairs $(X,A)$ one considers the inclusion map $i : A \to X$. This means that $f$ is instanciated by $i$, $X$ by $A$ and $Y$ by $X$.
A: Given a continous map $f:X\to Y$, the mapping cylinder $M_f$ is the space obtained by attaching $X\times [0,1]$ and $Y$ along $f(X) \subset Y$. In other words, we identify $X\times\{1\}$ and $f(X)\subset Y$.
Indeed, $Y\subset M_f$, so $Y$ is a subspace of the mapping cylinder $M_f$, as is $X =X\times\{0\}\subset M_f$.
The mapping cone is simply the mapping cylinder $M_f$ for which we collapse $X\times\{0\}$ to a point or equivalently we attach the cone $$CX = X\times[0,1]\big/ X\times\{0\}$$ along $f(X)$ to $Y$.
We can in fact consider $f:X\to Y$ to be an inclusion $X\hookrightarrow Y$, i.e. $X\subset Y$ by the following observation:
Let $M_f$ be the mapping cylinder, then clearly $X\times\{0\} = X \subset M_f$. Let $i:X\hookrightarrow M_f$ denote the inclusion of $X$ into $M_f$. Now $Y$ is a deformation retract of $M_f$, that is, there is a retraction $r:M_f\to Y$, therefore $f=r\circ i$ factors through $$X\xrightarrow{i} M_f \xrightarrow{r} Y.$$
Maybe that helps.
