That sounds like torn ligament, maybe posterior cruciate ligament (PCL) injury. Signs and symptoms of torn ligament are:
Pain. Mild to moderate pain in the knee can cause a slight limp or difficulty walking.
Swelling. Knee swelling occurs rapidly, within hours of the injury.
Instability. Your knee might feel loose, as if it's going to give way.
Treatment depends on the extent of your injury and whether it just happened or if you've had it for a while. In most cases, surgery isn't required.
Over-the-counter pain relievers, such as ibuprofen (Advil, Motrin IB, others) or naproxen sodium (Aleve), can help relieve pain and reduce swelling. If the pain doesn’t reduce, you need to do some therapy. A physical therapist can teach you exercises that will help make your knee stronger and improve its function and stability. You may also need a knee brace or crutches during your rehabilitation.
You can also try the following remedies at home.
Rest. Stay off your injured knee and protect it from further damage. You might need crutches.
Ice. Apply ice packs to your knee for 20 to 30 minutes every three to four hours for two to three days.
Compression. Wrap an elastic bandage around your knee.
Elevation. Lie down and place a pillow under your knee to help reduce swelling.
If the pain is severe, you need to orthopedic surgery or sports medicine department to see a doctor.