In the Republican presidential primary, there were essentially two points of view on abortion rights. We can categorize these two views fairly accurately, I think, as prohibitionist and federalist. Both views affirm that Roe v. Wade (1973), the Supreme Court ruling that prevented states from banning abortion, was a bad ruling and should be either overturned by a more conservative Court or overruled by Congress.
The prohibitionist position holds that abortion should be banned at the federal level by constitutional amendment. This is the position held by John McCain, Mike Huckabee, and Sam Brownback, among others. The prohibitionist position essentially renders the Supreme Court irrelevant to the candidate's platform, and places the focus instead on obtaining a two-thirds pro-life majority in both houses of Congress and in the legislatures of three-quarters of the states (an unrealistic goal).
The federalist position, on the other hand, holds that the Supreme Court should simply overturn Roe v. Wade, which would allow states to decide whether or not to ban abortion. This is the view held by Mitt Romney, Ron Paul, and Rudy Giuliani (who describes himself as personally pro-choice). The federalist position is all about the Supreme Court--the objective being to appoint justices to the Court who will tip the balance in favor of a 5-4 ruling against Roe. Given the presence of known anti-Roe justices Scalia and Thomas on the Court, the presence of potentially anti-Roe justices Alito and Roberts, and the likelihood of an imminent Supreme Court retirement within the next presidential term, this is a more realistic, and subsequently more troubling, approach--but it would not result in abortion bans in most states. (See "What If Roe v. Wade Were Overturned?")
John McCain describes himself as pro-life and in favor of an abortion ban, and has done so consistently since at least 1984. He has, however, expressed some sympathy for the Roe v. Wade position. In one 1999 interview, he even went so far as to say that the ruling should not be overturned because of the impact it would have on young women who would then be forced to seek medically unsupervised abortions. He later backtracked, saying that he opposes Roe.
Ratings: John McCain has a 0% rating from NARAL Pro-Choice America, and a 67% rating from the National Right to Life Committee.
Federal Abortion Amendment: McCain has stated that he supports a constitutional amendment banning abortion throughout the United States except in cases of rape, incest, or to save the life of the woman.
Robert Bork: In 1987, John McCain voted to confirm Reagan Supreme Court nominee Robert Bork, whose nomination was narrowly defeated in part due to the perception (later validated) that Bork intended to overturn Roe.
Safe Sex: McCain has opposed federally funded contraception programs, while supporting funding of abstinence-only sex ed programs.