Popular music is, by definition, music that appeals to many people. You don't have to know anything about music to like a pop tune - it's "catchy". Art music is a catch-all term for any music that is enjoyed by a smaller crowd. This can include the more challenging types of jazz and rock music, as well as Classical. Most people agree that the appreciation of art music requires some study, careful listening, or other extra effort. But it can be harder to agree on what exactly belongs in this category. This is at least partly because popular tastes do change. For example, most operas were written to be popular, middle-class entertainments, and artists such as Liszt and Paganini enjoyed rock-star-like fame and popularity in their day. Today, however, nineteenth century operas are no longer considered popular entertainment, and popular works that could technically be considered opera - except for the fact that they are written in popular musical styles - are instead grouped with musicals. As another example, ragtime50 was wildly popular during Scott Joplin's51 lifetime. It later fell out of favor and was known only to some jazz connoisseurs. Then in the 1970's it became popular again.
Classical music is a confusing term with more than one meaning. In the visual arts, the term classical refers to ancient Greece and Rome. In the 1700's, Western Europeans became very interested in the ancient classical style, which was imitated by many artists, sculptors, and architects.
Art historians call that period the neoclassical ("new classical"). Unfortunately, nobody really knows what the music of ancient times sounded like. So instead of being influenced by the sound of ancient Greek music, eighteenth-century composers were influenced by the ideals of classical art.
The music of Mozart, Haydn, and the early works of Beethoven are in this style, which we call classical rather than neoclassical, because the original classical music of ancient Greece and Rome is lost. (And actually, it probably would sound very exotic and Non-Western to us if we could listen to it!)
So the original classical music comes from one fairly short era. The other great composers of Western music lived during other periods: Bach and Handel were Baroque era composers, for example; Brahms and Wagner, Romantic52; and Ravel and Debussy, Impressionist. But most people do not know which music is from which period. So all of the music of the great Western composers of the past (as well as modern art music that is part of the same tradition) is lumped together and called classical. The art music of other cultures is also often called classical; for example, people speak of the classical music of India.