Proving $\phi$ is continuous In this video the lecturer gave an example, that is:

$\phi : M\to N$, where $M$ is equipped with arbitrary topology $\mathcal O_M$, and $N$ is equipped with the chaotic topology $\{\varnothing, N\}$. Then any $\phi$ is continuous.

It's clear that the preimage of $\varnothing$ must be $\varnothing$ and thus a open set in $M$, but why the preimage of $N$ is an open set in $M$?
The preimage $\phi^{-1}(N) = \{x \in M : \phi(x) \in N\}$ is equal to $M$ and $M$ is open by definition of a topology.
Any map into a space with the trivial topology is continuous (as is any map from a discrete space), which can be easily seen, for instance, by applying the definition that the preimage of any open set is open.