Your brain takes the input from your ear and looks for patterns, here's a visualization of what that might "look" like inside your mind...
This pattern recognition is used in music to combine sounds in pleasing (usually) ways - especially in making CHORDS - which are used often by songwriters. The video below shows how just four basic chords make up the backbone of a ridiculous number of popular songs (perhaps you'll write the next hit?)