Steroids decrease the local inflammation in the area of injection. In many cases the local inflammation is the cause of the pain and therefore reducing or eliminating the inflammation should cure your pain.