It can be argued that any kind of classification of musical styles is arbitrary and therefore not appropriate. Due to the diversity of musical styles and how they are overlapping with each other, it is very difficult to set the boundaries since very often these bounds do not reflect the medley of cultures and time periods that spawned that particular sound. Nevertheless, here are a few ways through which academics have attempted to classify music.
Musicologists often tend to use Tagg's classification of music into art, popular and folk music. Art music is defined as contemporary and historical classical music which emphasises formal styles, technical and detailed deconstruction and is preserved in a form of music notation. Popular music is distributed to the wider public through mass media and is often created to be marketable among socially and culturally diverse societies to appeal to everyone. Folk (or "traditional") music has a cultural core and is deeply intertwined with customs of a particular area or region; it is usually preserved and learnt through oral tradition. All three of these do not have strict boundaries and can very often overlap.
Another way of distinguishing musical styles is according the time period in which it was created and was popular. This is a fairly traditional way to classify music genres and also makes it easier to learn them in chronological order. Ancient, Medieval, Renaissance, Baroque, Classical, Romantic, Modern and Postmodern are the main musical epochs. Modern and Postmodern music also have a lot of sub-genres, such as the music of a particular decade. It has to be pointed out though that these classifications are only relevant to European music.
There is also a way of classifying music styles according to the instruments and techniques used. For example rock music is based around strings and percussion, whereas jazz music mainly uses wind instruments like trumpets and saxophones. This taxonomy breaks down fairly quickly: there are 'jazz guitar' bands, rock songs with saxophone solos, and all sorts of fusion elements melding together many different genres.
Some might want to categorise music according to its geographical origins. Under the broad title of 'music from a particular country' there will be a lot of sub-genres based on different kinds of classification. This is a great example of genres overlapping, for example German music will include classical and popular, as well as rock and jazz: everything from Wagner and Bavarian folk through to Kraftwerk and Rammstein.
A very recent and popular way of classifying music is by its social function. For events or different occasions we are looking for music that has a common theme. Classical examples are Christmas music or Wedding music.
Each one of these classifications is not perfect and includes a lot more sub-genres that are not listed here. Studying music theory would give you an opportunity to learn more about music classification and about each genre in particular.