Some time ago I tore the miniscus in my knee and it prevented me from straightening out my leg. The tear happened when my knee was in a folded position (kind of like a squat) and there was not any appreciable pain when the tear happened, but I did definitely know that something went wrong. The pain was not too bad right after it happened, and I was able to walk without too much pain over to a chair. But within an hour or two, the pain increased to where I could not put much weight on the knee. I found out later that the cartilage from the meniscus had torn and folded over, preventing the knee from straightening out. Hopefully what you have is nothing this serious, but if it does not start to get better over the next day or two, you may have to go see an orthopedic, as mamboni says.