/tmp is the location for creation of temporary files and directories. It's not usable for storing "well-known names" (i.e. names another process could be aware of without you having to convey the name to it somehow) because nobody has ownership over the namespace; anyone can create files there. As such you generally use it when you have a utility that needs a file (i.e. not a pipe or such) as input or output, where any (randomly generated) name will work as long as you pass the name in.
Historically, some things (like X) violated this principle and put well-known names (like .X11-unix) in /tmp. This is of course buggy and allows any user to DoS the service needing to do so simply by racing to create a file by the desired name first. Such things belong under /run (or equivalently /var/run if you don't subscribe to fdFreedesktop.oorg revisionism). Of course even better would be to fix them not to use well-known names in a global namespace but instead pass around a pathname.