For completeness' sake:
Fragmentation depends on the filesystem(FS), not on the disc or OS.
This means that answer to your question does not really need to ask for Windows*; SSD is special case - it works differently than an ordinary disc.
An FS is a way of organizing your files on the disc. The most common Windows formats are
FAT32. The most commonly used FSs on Linux are
ext4, but there are many others (
btrfs, and more).
A disc is divided into blocks. You can imagine it as a long tape on which you can write some data. When you write something onto the disc, you use these blocks. Obviously you want related files to be written next to each other, and a single file to be written in a single block, so you don't have to jump around the tape. When things are all scattered around, that's what we call fragmentation. Defragmentation organizes them.
Obviously how you organize things (FS) determines how well they are organized (whether there is fragmentation). If you organize your files from the start, you won't have fragmentation. That's what happens in some filesystems (e.g. the
ext family). These filesystems organize your files on the fly (before writing), so that you don't have to defragment them except under special circumstances when there wasn't any other choice but to to introduce a little disorder.
For more information about
ext4 and how it prevents fragmentation, you can refer to this page
Now an SSD works differently; it's not a tape. You can get instant access everywhere. The whole point of defragmentation is that you organize your files neatly, so that you don't have to jump around. There's no way to jump around in an SSD. You don't care whether you have to get to the other end of the tape back and forth; there's no tape.
However, there are other ways of optimizing an SSD. See this topic for clarification.
*Almost; filesystem choice is correlated with OS. Most Linux users use different FS than Windows or OS X users.