Hi, thanks for asking. On average it's required to go to a top law school, get top grades, get on the law review, and to get a senior position on the law review in one's third year. These things aren't really a function of rote intelligence, but a lot of grinding and luck, especially with respect to grades where things at most schools are on a curve where one person's A means another person has to get a B, even if they had similar, A-quality work.

With those things as a given, in the end the filter is who is willing to go to bat for you (and a lot of luck). The usual process is to get to know and impress a well known law professor. Make sure they know who you are. They will go to bat for you to get into a clerkship with a well known Federal District Court judge. Impress that judge and after a year, they will go to bat for you to get a clerkship for a well known COA justice/Circuit, who will then hopefully feed into a SCOTUS clerkship.

To give a concrete example: One might do well at Stanford Law School and impress some professors who get to know you and write recommendation letters for you to apply to clerkships through the OSCAR system. One is sufficiently impressed with you that they're willing to give their friend and former clerkship boss Judge Alsup at the Northern District of California a call and recommend you more personally. Judge Alsup accepts you as a federal court clerk and you do well, working very hard. You decide to apply to COA clerkships the following year. Judge Alsup is sufficiently impressed with you that they're willing to give their friend Merrick Garland (to use someone whose name you've heard, but who is also a well known SCOTUS feeder justice) a call. You then impress Justice Garland after a year and they, along with Judge Alsup and your professor who just happened to clerk for Justice Breyer, are all willing to support your application to be a SCOTUS clerk for Justice Breyer. They all put in personal recommendations with Justice Breyer, who takes them seriously because they're serious, well known people with great reputations. With a lot of luck, even with these connections, you can get accepted to be a SCOTUS clerk.

So I would argue once you have the given grades, law school, and law review membership, it really is about connections. But not in the "my father used to golf with that justice" sort of connections, more trusted connections because you've built a relationship with the connection through hard work and a willingness to work nearly nonstop. But even more importantly, someone who has connections to people who have connections, who have connections to SCOTUS justices. However, even the absolutely best situated candidates don't have a more than average shot at success at their SCOTUS clerkship application. But this isn't a one way street. People typically only recommend you if you have impressed them and they think you'll do well, because then the next node will take their recommendation again in the future, and it's a sought after position to be able to say Judge Alsup often hires people you recommend, and it's sought after for Judge Alsup to be able to say Merrick Garland takes his recommendations on who to hire, and so on.