It's actually possible for a convex function to have multiple local minima, but the set of local minima must in that case form a convex set, and they must all have the same value. So, for instance, the convex function $f(x)=\max\{\|x\|-1,0\}$ has a minimum of $0$ for all $\|x\|\leq 1$. (In one dimension, a convex set is just an interval.)
In particular, what is not possible is for a convex function to have multiple disjoint local minima. For instance, the nonconvex function $f(x)=(x^2-1)^2$ obtains a minimum of $0$ when $x=\pm 1$.
Consider also the nonconvex function in $\mathbb{R}^n$, $f(x)=(\|x\|^2-1)^2$. This function obtains a minimum of $0$ when $\|x\|=1$, the unit ball. This optimal set is connected when $n\geq 2$, but not convex.
Of course, a convex function need not have a minimum at all; for instance $f(x)=e^x$. But if a convex function has a local minimum, it is a global minimum, and this and all other points that achieve this same value form a convex set.