In their last year (terminale/upper 6th/Yr 13) all pupils who want to pursue their education input as many as 20 choices (it's a national database) into the Parcoursup platform.
They need to include motivational letters depending on what they want to go into.
Their grades from both years (première and terminale) and their bulletins (school reports) are also input with their teachers' opinion (avis très favorable, avis favorable etc.) into Parcoursup.
The algorithm sorts everything out and sends the info to the requested establishments (universities etc.).
If the parcours (place/degree) is in high demand, only the highest grades and avis très favorable are even considered.
Your grades depend very much on where you live and which lycée you to.
Some pupils are immediately accepted for up to amd including their 20 choices, and other pupils aren't even accepted anywhere amd usually end up on a waiting list.
As pupils accept a placement (can only accept one obviously) it frees up places for other pupils who then move up the waiting list.
This goes on for weeks (sometimes even months) and is hugely stressful for everyone. My DS's girlfriend didn't get a place until a couple of weeks before university started.
Some establishments require face to face interviews before offering places, frequently this happens all in the same week, some even on the same day (last year a pupil in my DD's school had an interview in the morning in Marseilles and in the afternoon in Gap).
I'm sure Im missing things out, but you get the idea.