In my lecture notes, it says (talking about short exact sequences) that if you have
$$0\to A \to B\to C\to 0$$
and you know it's an exact sequence, then $B/A\cong C$.
The notes then give an example: if $A=\mathbb{Z}$ and $C=\mathbb{Z}_2$, then two things $B$ could be are $\mathbb{Z}$ and $\mathbb{Z}\oplus \mathbb{Z}_2$.
I get the second example, though not the first one. How could $\mathbb {Z}/\mathbb{Z}\cong \mathbb{Z}$ hold? Would the L.H.S. be equal to the trivial group?
This is a good question, when you have an exact sequence :
$$0\rightarrow A\rightarrow B\rightarrow C\rightarrow 0 $$
You are not just given $A$, $B$ and $C$ but also a monomorphism :
$$\iota : A\rightarrow B $$
and an epimorphism :
$$\pi : B\rightarrow C $$
with the condition that $Ker(\pi)=Im(\iota)$ ($\iota$ and $\pi$ respectively denote the second and third arrow).
Then when you write $B/A$ is isomorphic to $C$, it is not rigorously false but is ambiguous since $\iota$ and $\pi$ do not appear anymore. Actually, it would be more correct (and I strongly advice you to do it until you are used to the notation) that $B/\iota(A)$ is isomorphic to $C$.
In your example it gives :
$$0\rightarrow \mathbb{Z}\rightarrow \mathbb{Z}\rightarrow \mathbb{Z}_2\rightarrow 0 $$
Where $\iota: \mathbb{Z}\rightarrow \mathbb{Z}$ is given by $z$ maps to $2z$. Hence it follows that when you (ambiguously) write $\mathbb{Z}/\mathbb{Z}$ you (rigorously) mean $\mathbb{Z}/\iota(\mathbb{Z})$ i.e. $\mathbb{Z}/2\mathbb{Z}$ which is isomorphic to $\mathbb{Z}_2$.