Well, first the old pope must be declared dead after all, you cant elect a new pope while the old one is still alive. In a ceremony performed by the popes Camerlengo (chamberlain), the popes name (the name he was baptized with, not his chosen papal name) is called three times, and at each calling his head is struck with a small silver hammer to check that he is indeed dead. I think that we can assume, however, that better tests will have already been done.
After authorizing the death certificate and making the event public by notifying the Cardinal Vicar for the Diocese of Rome, the Camerlengo seals the Popes private apartments. He will also arrange for the Fishermans Ring which the pope wears (and which has his name inscribed on it) and the papal seal to be officially broken at the first meeting of the College of Cardinals. These are the symbols of papal authority and their destruction symbolizes the fact that there is now no such authority anymore.
The death of a pope begins a period known as the interregnum. During this time the Camerlengo is in charge of the Roman Catholic Church, taking over many the governing (but not theological) duties of the pope. If for some reason no one holds the office of Camerlengo, the College of Cardinals chooses one provisionally by secret ballot. During the interregnum, a period which also includes the conclave when the next pope is being elected, the heads of all of the dicasteries (agencies of the church government) in the Roman Curia are suspended from exercising their authority (day-to-day operations are carried on by subordinates). Once the new pope is elected, they are also expected to immediately resign their posts.
There are a couple of necessary exceptions to this: the Cardinal Camerlengo (who is as stated above has quite a few responsibilities during this period), the Cardinal Dean (who is responsible for convoking the College of Cardinals and formally summoning the electors to the Vatican), the Cardinal Vicar of Rome, the Cardinal Major Penitentiary (to whom cardinals must go for matters of conscience and absolution), the Cardinal Archpriest of St Peters Basilica, and the Vicar-General for Vatican City (the last two positions are normally held by the same individual). All of these people are necessary for the smooth functioning of the church to continue, not to mention for the election itself.
The Camerlengo is also responsible for organizing the popes funeral a massive event which will be attended by heads of state and religious leaders from around the world. The funeral will certainly be held in Rome, and while all 20th century popes have been buried in St. Peters Basilica, it seems likely that Pope John Paul II will be buried in his native Poland.
This may cause some difficulty as the pope is traditionally to be buried no sooner than four days and no later than six days after his death. For obvious reasons this doesnt cause problems when the pope is immediately buried in the same place that the funeral is held, but if his body has to be transported to Poland and buried within the specified amount of time, the funeral itself would have to be held on very short notice for all involved and the time for people to view the coffin may be shortened.
When actually buried, a pope is placed within three coffins, each lying within the other. The innermost coffin is cypress, the second is lead (on which there is an inscription of the Popes name and dates of his pontificate), and the outermost is an unadorned coffin made of elm.
After the funeral there is a period of mourning that lasts for nine days, known as the Novemdiales. During this period the old pope will be praised by a number of the cardinals who will be voting for his successor their praise will, however, likely be laced with subtle comments about what the next pope should be like.
After the Novemdiales is completed, there is a further fifteen to twenty days of General Congregations and sermons held by the cardinals at their Titular Churches throughout Rome and mourning for the Pope after his funeral. Once this period is over, the cardinal electors enter the conclave in order to choose the next pope.