It depends on your average % grade, not how many modules you fail. Generally I think you need to get over 40% average to safely be allowed to resit. So say you had 4 exams in january you scored 60% on two and 30% on the other two it would leave you with an average of 45% meaning you can resit in august, however if your grade falls below around 40% you may not be allowed to resit. Having said that it's best to speak to your personal tutor and possibly even head of department to be sure.
I wouldn't worry about it though, this happens all the time and lecturers see it all the time providing you haven't failed more than half of the exams you'll probably be ok.
Also even if you aren't allowed to resit, you are unlikely to be kicked out but rather invited back to resit first year.