There can be a substantial amount of time between the time a Supreme Justice leaves office and a replacement is confirmed.
For example, when Louis Powell retired in the summer of 1987, President Reagan nominated Robert Bork to replace him. It took the Senate almost 4 months to reject his nomination. President Reagan then nominated Anthony Kennedy (now the current longest tenured Supreme Court Justice) for Powell's seat on the court. His nomination came almost a month after Bork's defeat. Kennedy was not confirmed until almost 2 months later.
Another example is the replacement of Abe Fortas who resigned from the court in May 1969. President Richard Nixon first nominated Clement Haynsworth to replace him. His nomination was rejected by the Senate in November 1969. Nixon then nominated Harrold Carswell in January of 1970. Carswell's nomination was rejected by the senate in April of 1970. Nixon's third nominee for the seat, Harry Blackmun was confirmed by the senate in June of 1970.