Musicians train their ears to recognize and understand specific pitches, intervals, melodic and harmonic progressions, rhythms and meters. Ear training students learn to sight-read (perform music they've never seen before) and to transcribe the music they hear to staff paper.
Music theory is the study of the elements of music--melody, harmony and counterpoint, rhythm, meter, texture, and form--and how these elements function. Musicians studying theory examine Western art music, as well as contemporary works that evolved from the classical tradition, making note of these components.
Performers, composers and music teachers study ear training and theory beginning in high school or college, enabling them to learn new music quickly for auditions, gigs, projects and lessons.
Music theory is, in itself, a profession. Theorists often conduct their research in university settings while serving as music professors. Many theorists are also composers.
If you're interested in sharpening your aural skills and developing a better understanding of music, you'll find courses in ear training and music theory at your local college or university.