When a dwarf is wearing a sock, and it wears out, and a new sock is available somewhere in the fort, she will drop her old sock on the floor (wherever she happens to be standing at the time), claim ownership of the new sock, and then start a "Pickup Equipment" job to go get it and put it on.
At that moment, the old sock is also still hers. This means it cannot be dumped (because it's some dwarf's personal property).
What happens next depends on a few things. If the dwarf has a room, with open floor space, or with a non-full cabinet in it, she may perform a "Store Owned Item" job, to move the old sock into her room (either into the cabinet, or onto the floor tile). If that happens, the sock will remain there, in her room, for a Very Long Time Indeed.
On the other hand, if the dwarf's room doesn't have any open floor space (because it's already full of worn-out trousers and dresses and gloves), then the old sock will sit there for about 2-3 in-game weeks (I don't know the exact time interval). After that time, the game will automatically remove the dwarf's ownership of the abandoned sock; it will become common fortress property instead of personal property. Once that happens, it can be dumped, or stockpiled, just like any other unowned article of clothing.