It might be due to the vertebrae pressing against the sciatic nerve, it is called sciatica pain. You should get get an x-ray of the lumbosacral spine-ap view and get yourself examined by the doctor.
You need to see your doctor. This has many causes, some innocent, but may be an indication of a compressed disc or nerve, or other disorders. Pain is a heads-up.
Not enough information to know what is wrong. Did you fall you might want to seek medical attention , call your doctor and see what they want you to do.
The pain may be caused by muscle strain. Try to avoid activities that cause more stress on the muscles. Ice the pained area and lift the legs to prevent swelling.