Would someone please explain how 'gain' functions?


I would appreciate it if someone would explain how gain functions in audio equipment?
I have a 'gain' setting in my phono preamp.  A Gain value (along with loading) is recommended by a cartridge manufacture (MC) for proper function and playback.  So what exactly is 'it' in the electrical world?  What am I changing when I select a particular 'gain'.

When I play my records some are louder on the same volume setting then others.  I find this to be the case on many MFSL and other high quality 180 gram / 200 gram half speed master recordings vs the old school original stamped LP's.

Then there is the difference between loudness of my CD player vs my turntable.  The CD player being much louder than any vinyl playing at the same volume setting.  When I create a CD on my computer with online purchased songs some are very loud and some sound just normal to me at the same fixed volume setting.  I notice the same phenomenon with my Ipod.  Some songs are normal at a volume setting then some songs sound louder.   

I'm not trying to 'fix' anything, just looking for a understandable explanation of the term 'Gain' and how it works.   
Thanks in advance!
quincy
@Inna, you may be aware of the rule of thumb guideline that a 10 db increase in volume corresponds subjectively to "twice as loud," and correspondingly a 10 db decrease corresponds subjectively to "half as loud."

To provide some additional perspective, for a preamp or integrated amp having a rotary volume control whose minimum position is approximately at the 6:30 o’clock position, and whose maximum position is approximately 5:30 o’clock, a 6 db change will probably correspond to around 45 degrees of rotation. Assuming, that is, that the control is not in the lowest 20% or 25% or so of its range, where volume changes usually occur more rapidly as the control is rotated.

Regards,
-- Al
My cheap phono pre-amp has a gain control and a little light that goes from green to red depending on the signal. I never know whether to set it so the red flickers from time to time or never.
@N80, I would think the manual should and hopefully would answer that.  Or if not, a call or email to the manufacturer would seem to be in order.

Regards,
-- Al  
Al, thank you. With my current integrated minimum is at about 6 o'clock and max I don't know. Anything beyond 11 o'clock is unbearably loud with much higher distortion level. My normal range is 7 to 10. So I guess I would be fine if I still used the same amp and speakers.