Uses of Defragmentation and how it affects PC Performance

I have used windows 98, windows ME, windows XP, windows vista, and the last one windows seven in all those operating system defragment is a very important tools. But I don't understand why this tool is given and why it's necessary for the system. Does other operating system like Linux, Ubuntu, Mac also offers this tool? I have never used those operating system so I don't know about them.
But in Windows why it's used as vital tool. How it helps to improve the performance of the computer? I want to know how it works. Does it changes any thing of Hard drive? Or increase the performance of the hard drive? And how often it is necessary to use? Someone please tell me about the use of Defrag mentation. I will be glad if you please tell me in detail. Thanks.
