Do you have a course handbook? This will hopefully let you know the procedure if you failed. It is likely you will have the chance to retake, or you may be able to get a compensated pass. Was the module coursework or exam based, or both? If you have passed one, you may be able to pass the module regardless of your grade in the other (assuming the overall mark averages over 40%).
Try not to panic too much. If this is the only module you've failed, you're not going to be kicked off the course!
You could try asking if anyone in the year above knows how harshly or otherwise your lecturers mark.