Two months before your visa expires, you must go to the Préfecture to apply for a residence permit (titre de séjour). You will have to make an appointment and provide the necessary documents.
For more information, visit: http://91.accueil-etrangers.gouv.fr/