Yesterday I slid at volleyball and my leg went out in front of me. I now have a pain that is on and off. I don't know what to do and it hurts?

Knee gives out. It is time to be evaluated by an orthopedic surgeon with an expertise in sports injuries. It sounds as if you may have a collateral ligament injury but there are numerous other ligament or tendon injuries that may be responsible. It is likely that an MRI will be required to confirm the diagnosis.