Adjunction spaces Let $X,Y$ be topological space and A a closed subset of Y, a map $f:A\rightarrow X$ be continuous. We let $\sim$ to be the equivalence relation on the coproduct of X and Y by generating by $a\sim f(a)$ for each $a\in A$.....
The questions are:
(1) To generate an equivalence relation you need to generate it from a relation, so in the above case, what is the relation? “generated by $a\sim f(a)$ for each $a\in A$" doesn’t make sense because $a\sim f(a)$ is not a relation
(2) is 1 equivalent to identifiying f(a) and a? Meaning, I consider the equivalence class $x\sim y$ $\iff$ $x=y$ or {x,y}={a,f(a)}? And use this equivalence relation to construct the quotient space?
 A: If you have some subset $S$ of the graph $X \times Y$ the equivalence relation generated by $S$ is the intersection of all equivalence relations containing $S$. Colloquially, the smallest equivalence relation containing $S$. In this case, a point in $A$ is equivalent to a point in $Y$ if it maps to it, and two points in $A$ are equivalent if they map to the same point in $Y$.
A: If $R_i, i \in I$ is a non-empty set of equivalence relations on $Z$ (so subsets of $Z \times Z$ with certain properties), then $\bigcap_i R_i$ is also an equivalence relation. This is elementary to check. 
The equivalence relation as mentioned is defined as the intersection of all equivalence relations on $Z:=X \coprod Y$ that contain $\{(0,a), (1,f(a)): a \in A\}$ where $\{0\} \times X \subseteq X \coprod Y$ and $\{1\} \times Y \subseteq X \coprod Y$ are the copies of $X$ and $Y$ inside the sum space. This family of equivalence relations is non-empty (as $Z^2$ itself works), so this is well-defined. In practice it's easier than that : $(0,a) \sim (0,a')$ iff $f(a)=f(a')$ and $(0,a) \sim (1,f(a))$ for all $a$. So if $f$ is 1-1 we only identify points in $A$ with points in $Y$, otherwise we identify many points in $A$ as well, depending on their images: $(0,a) ~ (1,f(a))$ and $(0,a') \sim (1,f(a')$ but if $f(a)=f(a')$ the transivity forces $(0,a) \sim (0,a')$ as well. 
