Hard drives are linear and do not have any form of hierarchy. They are split into sectors which each contain a number of tracks. Each track can be used to store data. A table, known as the file allocation table (FAT), will link tracks together to form files. A collection of tracks is known as a cluster.

When a file is stored it will be broken down into chunks based on the size of a single track. These tracks will then be stored in continuous tracks (i.e next to each other) as much as possible. Sometimes when data is stored holes will appear which are not big enough to store a file but would be big enough to store half of it. That file will then be split into more than one cluster. Files which are stored across many clusters are said to be fragmented.

Fragmented files tend to be much slower as the hard drive will have to look in more than one part to find the whole file. If the file is split into three then it will need to look for all three as well as read them. If it is stored in a single cluster then it will only need one seek. The seek time and the read time of a hard drive are separate.

Defragmentation is the process of moving clusters so they are next to each other. The aim of this is to reduce the number of seeks needed to load a file.

Note - The EXT3/EXT4 file systems do not need defragging as they have a more intelligent way of storing clusters.