Since September 1th 2018, foreign students must register for Social Security except for students who have a European Health Insurance Card (EHIC). It's free and mandatory.
This allows you to benefit from reimbursement of your health expenses during your stay in France.