Defragmentation involves reorganizing the data on a hard disk so that all fragments of files are consolidated into contiguous free space, improving access times. It works by collecting all the pieces of individual files that may have become scattered across the disk into adjoining sectors. This allows files to be located and read more quickly. Regular defragmentation can improve computer performance over time as fragmentation increases with normal use.