When someone says "this song is haunting (me?)" should I understand "haunting" as annoying, or it is a music that I like a lot and can keep singing the whole day? The dictionaries in the Internet did not help.
Haunting in this context refers to a mood. Haunting music evokes emotion. It's the kind of music you might hear in the background of a tense scene in a movie. It's often marked by minor chords or deep instruments. Adjectives might include somber or moving. You can read about what one person regards as "haunting" classic music at this blog post: The Most Hauntingly Beautiful Classical Compositions Ever Written.
Macmillan defines the word as:
haunting (adj.) beautiful in a way that makes you feel sad and remember something for a long time
When it comes to the arts, though, this "sad" feeling is not necessary a bad kind of sad; rather, it can be quite cathartic.
I also like the meaning found at Collins:
haunting (adj.) enchantingly or eerily evocative
You probably wouldn't play haunting music at a wedding, but it could be very fitting for a funeral.
Haunting music is not limited to the classical genre, either; many dark rock songs could also be dubbed as haunting. What's regarded as haunting is partly a matter of taste, but I think the song Kettering by the Antlers would qualify as haunting modern music.
To say that a song / music is haunting references how deep it hits the listener. This is a song that does not just grace the surface of one's ear. Instead, this is a song that moves quickly past the ear to the depths of the inner chambers of one's heart and can go even deeper the more you listen.
It's music or a song that is not necessarily happy or sad but that punctures the core of one's truth.
To give an example here are three different songs that for me are haunting in how it moves me....
William McDowell IN https://youtu.be/jegcILGt1BE
Tina Marie OUT ON A LIMB https://youtu.be/T1GaeoNpqvs
Van Halen RESPECT THE WIND https://youtu.be/nP6nKTu6TGY
Each of these songs, which are all different genres hits me in a place where for me they are haunting due to the depth of what I feel inside when I hear them. I love them. Can listen to them for long periods but not all day because they take my breath away.