First write GRE. Try to get a score above 325 which will give you good chances of getting accepted in top universities.
For the application write a SOP closely related to your interests and projects(max two pages).Get minimum two recommendation letters from professor’s of whom you have worked with or with other experienced professionals with who you have done an internship.
Keep the start and deadlines dates in mind.Applying early gives you a good advantage but again it all comes down to your score and profile.
After getting an accept, apply for loan(if required)and also for visa.