Question: I have the following definition: 

Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( U' \right) \in \mathcal{T} \}$$

and the properties:

1. $q$ is a bijective quotient mapping $\Leftrightarrow$ $q$ is a homeomorphism
2. In general, $q$ quotient $\not \Rightarrow q$ open. 
If $U \in \mathcal{T}, q(U)\subset X'$ is open if $q^{-1}\left( q\left( U \right) \right) \in \mathcal{T}$ but not in general.

I could not find an example of quotient mapping for which $q^{-1}\left( q\left( U \right) \right)$ is not open. I would understand the idea better if you could show me one.

Answer: 
Consider $\mathbb{R}$ with the standard topology. On $\mathbb{R}$, consider the equivalence relation

$$x\sim y \iff (x = y \lor \{x,y\} \subset \mathbb{Z}),$$

and let $(X',\mathcal{T}')$ the quotient space $\mathbb{R}/{\sim}$. By definition, $\pi \colon \mathbb{R}\to X';\; x \mapsto [x]\_\sim$ is a quotient map, but that map is not open:

If $U \subset\mathbb{R}$ is an open set containing an integer, then $\pi^{-1}(\pi(U)) = U\cup \mathbb{Z}$ is in general not open.
Here is a "visual" example: 

Wrap the unit interval $[0,1]$ around the unit circle $S^1$ by identifying $0$ and $1$. The interval $[0,1/2) $ is open in $[0,1]$, but its image in $S^1$ is not open.