Our brain can be divided into 4 parts - frontal lobe, temporal lobe, occipital lobe, and parietal lobe. When we listen to music, all four parts react. Though all of them work on different aspects, they all respond. When the music enters our brain it is split into pitch and volume. After that comes the feeling of emotions.
The different effects music can have on your brain depends upon the genre we prefer to listen.
Everyone may react to music differently. Some people prefer soothing, calming music while some prefer upbeat and high tempo. Some may be preferential to rap music while some towards instrumentals. But all these genres affect the human brain the same. Music shapes our brain, and listening to different kinds of music engages a larger network of your brain.