I heard rock singers etc., who sing really high notes, and I think that they use their head voices. But when I use my head voice, it doesn't sound melodious. What can I do to improve on this?
You need to exercise your voice. Taking voice lessons from a professional teacher is the best, quickest way to achieve what you want.
That said, if you're determined to start on your own, I'd begin with singing scales (notes next to each other, usually over the range of a 5th (5 notes) or an octave (8 notes), starting in a comfortable range, and moving your starting note one half step higher each time. (Half steps are notes directly next to each other on a keyboard, including the black notes.)
Most people are most comfortable with an 'ah' vowel sound OR an 'ee' vowel sound. Spend 10-15 minutes twice daily doing this. You can also find lots of how-to voice videos online. You have to take good, low, breaths with a relaxed but tall posture, and be sure the air-flow is adequate to keep your vocal folds moving easily, without tension. If you're feeling a lot of tension, you should stop.
There are a whole lot of rock singers, some of which do use head voice. I think your definition of head voice means falsetto, and some rock singers absolutely do this; some, however, use "head voice" to mean other things. Some rock singers do sing in falsetto (AC/DC's lead singer does a lot of this), but that hair-metal high voice is usually a regular voice singing up into the high tenor range (which takes a whole lot of practice), and I'm not sure everyone can. Of course, most rock singers are male, and if you are female, you probably won't sound very idiomatic for rock music in any type of head voice (meaning a separate vocal register). Either way, I must recommend a vocal instructor (and yes, that's a real thing for rock singers). The last thing you want is to permanently injure your vocal cords trying to sound like that guy from Guns & Roses.