"To hear" expresses the involuntary action of picking up sounds by the ear, so it is a natural ability. "To listen", in turn, denotes effort to focus or pay attention. As Joseph was silent (not talking), not paying attention (undestanding) to the teacher, he was just hearing.