What is /dev/shm and its practical usage

Interesting to compare this with tmpfs other examples of filesystems kept in RAM.