It's time to apply to the PhD programs you chose. You should apply when you are sure you have things ready, but of course you should have things ready well before the deadline. Making a cheklist of the specific requirements and deadlines for application at each school is helpful.
You will apply online in most cases. So, you need to register at the website for application, creating a password. Then, there is a long form to fill online. You do not need to complete the application in one go, you can start one day, and continue later. Some schools use the same system, so the forms will look about the same. Some schools use their own system, and may look very different.
While filling the forms and sending the files, you will probably see several requirements you didn't know before. Maybe the size of your transcript file is too big, and the system only accepts files half that size. Maybe your resume for that school must be shorter than you expected. Maybe you are asked to provide some information or documentation they didn't tell you before. Be ready for changes, which will demand time.
An important reason to start your application long before the deadline is the need for Letters of Recommendation. You will be asked to inform the e-mail addresses of your recommenders, and some additional information (what is your relationship with the recommender, for example). E-mails should be official ones from schools or organizations, not generic ones like Gmail or Hotmail.
After that, the system will e-mail those recommenders with instructions about how they should proceed to send their letters, also online. I don't know what recommenders must do to send letters, since none of my recommenders showed it to me. But applicants are able to see if the system has already sent an e-mail to each recommender, and if the recommender has already sent the letter. Since recommenders may take a long time to write and send those letters, if you start you application too close to the deadline, recommenders may not have enough time to send their letters. And you application will be incomplete. If recommenders take too long, you can send them a reminder.
You can finish you application, including payment of the application fee, before schools receive the letters of recommendation.