So here's the definition of a quotient topology
Let $(X,\tau)$ be a toplogical space and define some equivalence relation $\sim$ on the set $X$. There exists a natural surjection denoted $p:X \to X/\sim$. Then the quotient topology on $X/\sim$ is
$$\tau_q=\{W \subseteq X/\sim : p^{-1}W \in \tau\}$$
Well, I am trying to see that $\tau_q$ is actually a topology. I am stuck on how to even think about the first axiom that "the entire set is in the topology."
Namely, I need to show that "$X/\sim \in \tau_q$" or equivalently,
$$p^{-1}(X/\sim) \in \tau$$
My problem is, $X/\sim$ is essentially a set of equivalence classes. So, if $X \to X/\sim$ I know exactly which equivalence class/element of $X/\sim$ it will be sent to. The reverse $X/\sim \to X$ is not so clear necessarily. That is one issue. Another is, the ambiguity of what topology is defined on $X$, namely, what are the elements of $\tau$? All I know is that they satisfy the requirements of a topology.
I consider the modulo $2$ on set $\mathbb{Z}$. Then $\mathbb{Z}/\sim=\{[0],[1]\}$. I can specify a discrete topology on $\mathbb{Z}$ for instance(but what if some other topology is defined on it?). So $\tau$ consists of all subsets(power set) of the integers. In this case, sine any subset imaginable on the integers is open so $p^{-1}(\mathbb{Z}/\sim) \to \mathbb{Z}$ is open.
I just don't know how to generalize this; for some other topology? Like say, how about the indiscrete topology, so $\tau=\{\mathbb{Z},\phi\}$. Then, $p^{-1}$ might send $[0]$ to any even number so, it could be $0,\pm 2,\pm4...$ and similarly to the odds for $[1]$.
Say it sends $[0] \to 2$ and $[1] \to 1$. So basically, $\mathbb{Z}/\sim$ is sent to the set $\{1,2\} \in \mathbb{Z}$. Is this in the topology? i.e. is this set open? Well no, because $\{1,2\} \not\in \tau=\{\mathbb{Z},\phi\}$.
I mean, it need not be sent to $1,2$ it could be anything else as long as they are even/odd respectively, but even so the "pair" of even and odd integers is not in $\tau$ the indiscrete topology on $\mathbb{Z}$.
So, $p^{-1}\mathbb{Z}/\sim \not\in \tau$ in this case and therefore the entire set $\mathbb{Z}/\sim \not\in \tau_q$, which violates the axiom a topology must satisfy.
where have I gone wrong in my thoughts? Please give me an idea of how to prove that $\tau_q$ is a topology!
For any function $f:A\to B$ between any sets, you always have $f^{-1}(B) = A$, because all elements of $A$ are sent into $B$.
Apply this to $p:X\to X/\sim$ : $p^{-1}(X/\sim) = X$.