They actually can get fragmented (I could post instructions on how to do it) but in general only when dealing with very large files which are frequently created and deleted. You'd encounter it when doing things like rendering large video files. Even in those cases, though, you'd typically render out to a separate partition, so even then your root partition is unlikely to get fragmented, unless you're doing [i]everything[i] on your /-mounted partition.
However: Under typical use, the mainstream Linux filesystems tend to not get fragmented and defragging typically is totally unnecessary. There are some defrag utilities which you can run on an unmounted partition, but since fragmentation is so infrequent on Linux you really don't need to worry about it. You might have a small handful of fragmented files and if you cleaned that small number up you'd never notice any improvement in performance because it's so negligible.