After the latest legs day I had pain in the inner side of the place between leg and groin. It hurts only during the lowers part of the squat and press machine (I didn't notice anything during that workout thought). I didn't pay much attention to it, however after a week on the next legs day I felt it during the warm-up squats with empty barbell and when I put the weight I couldn't perform because of it. So I skipped squats and press machine and only did other machines for legs ( and it didn't hurt there ). Is it a sprain and what do I do about it? When can I start squatting again?
I've been through a similar endeavor, and in my case, it was a case of a pulled muscle. It's very normal to have low flexibility turn into muscle-pulls. Especially during squats, where a very heavy load is placed on muscles that are required to be elastic, or be destroyed.
I suggest you start stretching your lower body quite thoroughly. Not only is it going to rehabilitate you in terms of flexibility, but it prevents this type of injury by balancing out your muscles' stiffness after things like prolonged sitting.
Some good post-workout legday stretches are detailed here. For your particular injury - between the legs and groin - the butterfly (the one with the girl sitting, knees out to the side) would stretch the muscles (adductors) and tendons in question. Of course, while you're still recovering from the injury, this isn't the way to go, but if you start doing this after a legday, you'll reduce the risk of it happening next legday.
You should also look into how you can improve your warmups. A properly warmed-up body also has a lower risk of mid-rep injury. Some dynamic stretches could be included here for more benefits.
As a rule of thumb, without going into the nitty gritty, you should to dynamic stretches before the workout, and static stretches after. The dynamic stretches include movements which facilitates a good warmup as well as a light stretch. The static stretches ease the tension in your muscles, and provide immediate relief.
As mentioned in the first paragraph, I experienced a mid-workout injury very similar to what you're describing, but mine was during a deadlift, and it was the top part of my hamstring. These days, I stretch and foam roll like it's my job, and I've been injury free since.