Being a little bolder (and less musically trained actually), here's what I know about the assemblage of music:
A typical Iron Maiden song, as quoted by Steve Harris, the bassist and de facto leader of the band is it has the slow beginning, the main body, the gallup, and then the slow ending.
Basically, they follow a standard verse, refrain, verse refrain pattern, with the beginning and ending being slow, with a speed-up in the middle.
A simple rock song is usually made of a few basic patterns. once you know the pattern, you've got the entire song down, except for the solo. The basic pattern is usually based on a chord progression.
What's a chord progression? You take the key of the song (D for example), and there are other notes in the numbered progression of the scale from that note. So, the typical rock song follows I-IV-V-IV, which based off of the key of D means the IV = G, V= A
That means you'd strum D four times, G four times, A four times and then G four times for a basic rythym of a song in 4:4 time.
Here's a site to make up chord progressions:
http://autochords.com/
Let's learn how to play a song on guitar. Guns-n-roses Used To Love Her
Go google how to play guitar for the chords, D, G and A (you can cheat and just press the single not on a keyboard if you just want to get a sense of it).
The main riff is DAGA strummed in a pattern like this / /// (that's a strum, brief pause and a triple strum) for each chord.
Then, the refrain is
GAGAGD
Slightly different strum pattern can be used to match Axel's singing:
G A G A G D
//// //// ////
It's three strums on the G then a strum of the following letter.
Probably other ways to play it, but based off my memory and cribbing from some tab site, that's it.
The idea then, is that your basic song has 2 parts, a verse and a refrain.
The verse has unique lyrcis, the refrain is the repeated part.
You can find some simple strum patterns and chord progressions and you just filled in the rythym and lyric part of the song.
Then you can throw in bridges, intros, etc with some change-ups and guitar solos.
The melody part of the song is the notes the singer is using. They'll contain notes from the chord progression, and probably some extras for flavor.
If you're really cheap as a lead guitarist, your solo will consist of playing that melody in higher octave, usually with distortion. Twisted Sister would do that trick by playing the melody once in high pitch, then they'd kick in an extra guitar effect and play it again and that would constitute the solo.
We're Not Going to Take It for example
there's a lot I left out, which should stimulate more questions, and corrections from others who have better understanding than I do.
Also note, not every song works the way I describe, but my explanation is mostly accurate for basic rock songs.