J. M. Barrie, the creator of Peter Pan, once said, "We are all failures - at least, the best of us are." This quote can serve to remind us that without making an attempt, we cannot succeed in anything.
No one likes to admit the possibility of failure, but if you find yourself not admitted to the graduate schools you applied to, it is important to view this as a setback rather than a defeat. The fact that you were not admitted does not mean you are unsuitable for graduate level work. The schools to which you applied could have lacked the funding to let in everyone they would have liked or they may have simply had an overwhelming number of qualified applicants. The professors reviewing your application could have had different interests than yours, or they could have just made a mistake and turned away applicants who would have done very well in their program.
The issue is what can you do now?
Applying to graduate school is much easier when you are already familiar with the process. Most people's test scores improve when taking the tests again because they the format and challenges and therefore know how to prepare properly. Similarly, if you have already written application essays, you are familiar with the basic procedure and can hone your skills and your essay. You can also have your essays edited by someone who can help you make it the best possible.
Another key factor to the application process is references. Improving references can be slightly trickier since it doesn't depend solely on you. However, if you didn't take advantage of providing professors with a clear resume and helpful information, doing so can improve the recommendations they provide. You can also look for different people to provide you with recommendations.
If you had originally applied to a school as a doctoral candidate and were not accepted, you may want to look into a Master's degree program as a jumping off point. The requirements are generally less stringent to be accepted into the Master's program and it provides you with the opportunity to adjust to graduate study and see if it's what you want to do. After completing a Master's you will have demonstrated your commitment to graduate study and should have a far easier time being accepted to the doctoral program of your choice.
Another similar option is to apply as a non-degree student. This will generally enable you to take classes with the other degree candidates, allowing both you and your professors to see if you can handle the work. Students who choose this path often have the opportunity to make an extremely positive impression on the professors guiding the acceptance process and when their application comes up the following year, they can have references included from the department to which they're applying.
When you are putting in applications next year, you have several options to consider. Your first approach would be to apply to the same schools as this year. This can be good if you have spent time working with professors from that school or changed your application significantly in some way. However, some committees will be less likely to admit applicants they have previously rejected, so it may be better to find new schools to apply to.
When applying to new schools, one of the primary methods of increasing your chances of acceptance is to pick schools that are either in less desirable locations or have slightly lower reputations.
Overall, the important thing to remember is that you need to be positive and pursue this as an opportunity rather than a roadblock. Good luck. We'll leave you with a thought from C. S. Lewis, "Failures are finger posts on the road to achievement."