Tolkien never really makes it clear what happens to men when they die.
The closest thing we get to a statement on it that "their souls go beyond the circles of the world...to dwell with illuvatar."
Dwarves are even less clear. It's likely the same as Men but they seem to have their own beliefs on the topic. They believe that they go to the "Halls of Waiting to await the renewal of the world."
Hobbits, being a mannish race, are the same as Men.
Orcs also are unclear. Tolkien wrote multiple origins for the orcs, none of which made it into his canon books, just his notes that were compiled into the histories.
If they are purely creations of Melkor then killing them would simply destroy them, as they aren't truly alive. Whereas if they are corrupted Elves and Men they would likely experience the same death as their race of origin.
It's also worth noting that Elves don't truly have an afterlife. They have a period of waiting in the Halls of Mandos after which they are reclothed in flesh and can choose to either return to Middle-Earth or remain in valinor.
Also, Frodo, Bilbo, and Sam as ring-bearers were allowed to sail west and live on Tol Eresea, an Island near Valinor so that their injuries from bearing the ring (and in Frodo's case the morgul blade) wouldn't bother them. They still only lived out their natural life span and then died the death of Men.