It is not a simple matter for the president to make a Supreme Court appointment. Many factors can influence the choice, and the consequences for the president and their political party can be dramatic even if the nominee is approved.
First, the president and their advisers must consider the qualifications of the candidates. In recent decades, almost all nominees have been federal judges. However, there is no rule that requires this. Even looking beyond the ranks of federal judges, the list of candidates who are both qualified and likely to accept the nomination may not be extremely long.
The factor that draws the most political and media attention is the ideology of the nominee. The president wants to appoint someone who agrees with their views. A president who opposes abortion would want a justice who shares that opposition. However, there are a lot of issues to worry about, and it is nearly impossible to find a candidate who is a "perfect fit" on all of them.
Even if the president finds a candidate with the desired outlook on important issues, those issues might conflict with the majority in the Senate. If the Senate is ruled by the opposing party, the president will have a difficult time getting a confirmation on a nominee with radical views. If the president's party controls the Senate, it will be much easier to confirm a nominee with views in line with that party, but it could still have a political cost in terms of public approval.
The president's popularity with the public is an important factor. If the president has low popularity, or popularity is evenly split, then pushing through a nominee with views that are perceived as "outside the mainstream" can galvanize opposition to the president and his party, leading to potential defeats in upcoming elections. This also explains why nominees who are named closer to an upcoming election tend to be more moderate — the president doesn't want to anger the public [source: Yalof].
The political leaning of the outgoing justice typically plays a role in the politics of nomination, as well. If a retiring justice is a political liberal, Senate liberals might fight a conservative candidate tooth and nail in order not to lose a seat on the court that supports their ideology. In that case, the president might do better to nominate a moderate candidate. If the outgoing justice is a conservative, however, the Senate liberals might accept a conservative appointment as maintaining the status quo.
Still, as we'll find out in the next section, there's no guarantee that the judges the president does appoint will vote the way he or she thinks they will.