Usually this is due to pain in the coccyx, or tailbone.
Sometimes it comes from trauma, but other times there is no explanation. If it only hurts when sitting on hard surfaces, avoid doing so! if you have no choice, there are coccyx cushions that you can buy to relieve the pain, or you can take over-the-counter anti-inflammatories. If the pain is severe see an orthopaedist.