Classical music is not a genre. It is a "catch-all" term used to lump together a very broad number of genres across a number of different cultures across many centuries. There is certainly much more than one style of music involved in such a vast period of time and across a vast range of cultures and peoples.
In contrast, when we refer to a contemporary genre such as "rock music", we are referring to a particular and very narrowly-defined style of music made mostly by musicians in the United States of America and England from about 1956 up until the present day, and chiefly by ethnically white musicians who speak and write lyrics in English. This is a tiny, brief genre compared to the entire history of all music.
Many music historians do not like to use the term "classical music", and there are many other ideas about how this music should be described. My preferred term is "traditional music".
When most people use the term "classical music" they are referring to all the "traditional" music made in all the countries in Western Europe since the dawn of civilization, in every nation and in every language. Furthermore in recent centuries the great powers of Western Europe conquered and colonized the rest of the world, spreading their music culture with them. So there has been classical music written in places like Mexico and the USA and Argentina which are derived from Western European forms.
[Music from the traditions of Eastern Europe, the Arab nations, Asia and India and Africa, and elsewhere have their own distinct melodic, rhythmic, and harmonic languages, musical instruments and styles that are very different than Western music. These styles developed virtually completely independently from Western music, and vice-versa. This is why we don't include indigenous music from these cultures when we talk about "Western classical music". This is not to imply that music from these non-Western cultures is in any way inferior. These musics have their own kinds of sophistication and virtuosity. But these musics are so different in character that we don't fit them into a discussion of what we call "Western classical".]
Within the "Western classical" tradition, we do, however, make a distinction between "classical" and "folk" music. The distinction is chiefly economic along with being artistic. Historically, "classical" music is music that is supported by patronage. The music is created when wealthy people, churches, governments or corporations hire composers and musicians and pay them to create their music.
"Folk" music, on the other hand, is music made by musicians who have no expectation of earning any money from their music -- they just play it for the love of music, and they are not part of the "patronage" system. They make "music of the folk" which tends to be less formally-organized, and handed down from generation to generation in more of an oral tradition, not written down in fixed form.
In the 20th century a third kind of music came about: "commercial" music. Commercial music is music that attempts to earn its own income without patronage, from selling things like recordings and sheet music, or getting paid royalties for having recordings played on radio or television or used in motion pictures. Of course this did not happen until the 20th century because before that time there were no recordings, radio, television or motion pictures, no iPods, no Internet. Of course during the period of "commercial music", or better put, "the music industry" there continues to be "classical" and "folk" music being created. But when music and musicians enter the "music industry" their music tends to become less "classical" or "folk" and more "commercial" in character. Genres like jazz, rock, Broadway, country, or any kind of electronic dance music fall into the "commercial" category.
When historians speak of "classical" music, they usually speak of distinct style periods, according to eras in history. Each style period includes all the "classical" music made in every nation, in every language, in every style of instrumentation or singing. Here is a list of the generally-agreed-upon style periods. Of course all dates and years are approximate.
Ancient (before 500 AD)
Medieval (500 AD to 1400 AD)
Renaissance (1400 to 1600)
Baroque (1600 to 1750)
Classical (1750 to 1830)
Romantic (1830 to 1910)
Modern (from the beginning of World War I to the end of World War II)
Post-Modern (1945 to today)
All of these names and distinctions of dates were labeled after the periods in question were over. (the terms "Modern" and "Post-Modern" sound lame because, well, not enough time has passed for us to invent more clever names.) And the "barriers" between one style period and another were not rigid. However, dividing things up into style periods gives one an opportunity to understand how Western classical music has evolved and developed.
Each different "style period" is characterized by composers using particular kinds of rhythm, melody and harmony in their music. New methods and styles of melodies, rhythms and harmonies were invented and used in each of the successive style periods, and these methods spread in waves throughout the Western world. I cannot take any more time here to explain how the music of each of these style periods is different; I hope that I have provided you a framework to do your own study on the subject.