Penelope's answer is already very good, I just want to give some additional details.
First, a Ph.D. is required to get a position in academia. To be even clearer, there are several positions and you can learn more about what is a maître de conférence or a professeur des universités here. In France, a Ph.D. is not the highest academic diploma that one can get as you can prepare yourself to get the Habilitation à diriger des recherches (HDR), which will allow you to supervise Ph.D. students.
To be eligible for a Ph.D. program in France (or doctorat), having a Master's degree (or an equivalent diploma) is necessary. Now the French educational system is quite confusing if you are not familiar with it. Basically, after a french baccalauréat, you can either choose to go to:
- Université: where you will need three years to complete your Licence, then an additional two years to complete your Master.
- Classes préparatoires aux grandes écoles (CPGE) and Grandes écoles: since you posted about mathematics, you will choose to go to a scientific CPGE, where you will attend a maths/physics intensive two-year curriculum that prepares you to take the concours d'entrée aux grandes écoles. These grandes écoles are given the right, by the government, to deliver a Diplôme d'ingénieur (or Engineering diploma), which is equivalent to a Master's degree.
While they both deliver Master's degrees (i.e., you can apply to a Ph.D. after them), the universités are more likely to prepare you for academic research whereas the CPGE and Grandes écoles are more suited for working in the industry. However, I highly suggest you to inform yourself about these two possibilities before choosing a path.
Finally, I want to emphasize on a point mentioned by Penelope: during your Ph.D., you remain a student, which means you can have access to all the privileges offered to students regarding everyday life (housing, public transports, social security, ...) while being pretty decently paid. Unless you have a family to support and if you don't have any accidents, there should be no reason to have financial difficulties.