Given a topological space $X$, a set $Y$ and a surjective map $q \colon X \to Y$ we may define the quotient topology on $Y$ by saying a subset $U \subseteq Y$ is open in $Y$ iff $q^{-1}(U)$ is open in $X$. I'm having some trouble with seeing how this is indeed a topology. For example, take $X=\{a,b,c,d\}$ equipped by the trivial topology and $Y = \{a,b,c\}$, and let $q = \text{id}_X$. By definition $Y$ is not open in $Y$ (and therefore the quotient topology is in fact not a topology on $Y$) since $q^{-1}(Y) = \{a,b,c\}$ is not open in $X$. What am I missing here? Does the definition of this topology require only that $\textit{some}$ surjective map induce it, and not any surjective map as the one I have mentioned? Also, by definition, $q$ should be continuous and in this case the $q$ is not; is that where the issue is coming from?
What should the appropriate map and topology look like explicitly from this example?
The quotient topology on a set $Y$ induced by a surjective mapping $q : X \to Y$ depends on the mapping $q$ and on the topology on $X$. It doesn't make sense to ask whether $q$ is continuous until you have equipped $Y$ with a topology. In general, there are many possible topologies on $Y$ that would make $q$ continuous: e.g., the indiscrete topology (for which only $\emptyset$ and $Y$ are open) will certainly make $q$ continuous. The quotient topology makes any subset $A$ of $Y$ open if $f^{-1}(A)$ is open in $X$, so it is the topology that gives $Y$ as many open sets as possible while still making $q$ continuous.