Of course, it helps to have good grades from your previous studies, but everybody else applying for PhD positions probably has good grades, too.
If you want to stand out, you have to do something different. The way I'm going to show you isn't easy or quick, but it works if you're willing to put in the effort.
The first step is to find academics who do the kind of work you are interested in. You can do this in a few different ways;
- If you are an undergraduate or master's student, find out what research is being done in your department (and who is doing it)
- Search the literature for interesting work (the kind of work that makes you go, "wow, that's cool")
- Find books on the specific subject, then look up the supporting references
Identify a few people who you think would be interesting to work with. Then read, deeply, some of their work. Engage with it. Think about it. Then think of a question to ask the author.
If you contact someone with a smart, informed question about their work;
- You show that you're interested in the work, not just getting the PhD
- You show that you're proactive
- You put yourself ahead of the 99% of other candidates who don't do this
In the initial email, though, you shouldn't ask about PhD positions. You can mention that you're thinking about doing one and that you came across their paper while reading around the subject, but don't ask them to be your supervisor yet.
Engage in conversation and keep it exclusively around the technical questions you started with. See it as a foundation phase; making contacts and getting a feel for who you might want to work with.
After going through this process a few times you can start making applications. Contact people you've had correspondence with before, let them know that you're now applying for PhD positions and ask them if they would be interested in supervising you.
Doing things this way takes time and patience, but it's a fantastic way to prepare yourself for a PhD and find good people to work with.
Note #1: If you see an advertised PhD position, go through the same process, but faster. Read the work of the potential supervisor and contact them directly and independently of the application with a question about their work.
Note #2: This process also works for applying for postdoc positions, too