Two functions discontinuous, but sum continuous
You can come up with some really interesting examples of compositions that end up being continuous where the components are not. Here's my favorite:
$f(x)=\begin{cases} 0 & \text{if }x \text{ is irrational}\\ 1 & \text{if }x \text{ is rational} \end{cases}$
Then $f\circ f$ is the constant function $1$ which is continuous.