lære can mean both learn and teach, while undervise can only mean teach.
Let's look at the two in the meaning of to teach:
at lære [NOGEN] [NOGET]
Jeg lærer børnene hvordan man binder snørrebånd
I teach the kids how to tie their laces
Here, but the direct object and the indirect object are required.
at undervise [NOGEN] [i NOGET]
Læreren underviser eleverne i samfundsfag.
Here, you can leave out the direct object ([i NOGET]): Jeg underviser gamle mennesker.