Torn gaments can be addressed surgically. Many veterinarians will perform anterior cruciate ligament surgery on dogs with great success. Without treatment, your dog's ability to get around will likely degenerate. If the ligaments are actually torn there is probably no alternative treatment as beneficial as surgery. This may be somewhat expensive, but is essential for your dog's health.
Talk to your vet about current pain management for your dog. Other than that, you have to wait for a bit and see if the torn ligaments in the hind legs will heal on their own. If the ligaments do not heal on their own, your dog will have to have surgery.
Any injury of this sort can find immediate relief from Rest, Ice, Compression & Elevation. This is just temporary pain control. See your vet for options such as pain meds, surgery, and/or physical therapy.