Open Question: My knee hurts, what could be the problem?

So at basketball practice my knee went out. The way it went out was unusual to me, I guess it bent back to far and I herd a pop. I tried walking to a seat but I couldn't and ended up crawling their. I couldn't even straighten it at all, my coach kept telling to do so, but I was scared because it was hurting. I did anyway and it was painful. I sat out for about 10 minutes stretching it and putting pressure on it and it felt better, and I continued my practice. So the rest of the day was pretty normal, I was running normally, doing my drills normally, -etc. When I woke up the next morning though, well I couldn't, I was basically straining to get out of bed. My knee was hurting so much, I didn't go to school, I stretched it, massaged it, and iced it about 5 maybe 6 times through out the day, but it hurts when I bend or straighten it still. When I'm just walking though It feels fine, but I just can't bend it to far back, so a slightly limp. I can't stand for a long time or it'll hurt when I bend it, when I sit or lay down for a long time it'll hurt when I straighten it. What could be the problem, did I sprain my knee, tear a ligament, dislocate it? I'm scared I might not be able to continue playing sports. Someone please help me.