Musical genres aren't strict laws written in stone; they are more like shared agreements between musicians and listeners. What places a song into a specific genre is a combination of sonic characteristics, cultural history, lyrical themes, and instrumentation.
Think of it as a recipe: changing a few core ingredients can completely alter the final dish. Here are the primary pillars that define a musical genre.