The ships are actually giant boats, and not space ships like was implied through the whole movie. As the ships are about to set sail, the lead scientist on the ship realizes that they are about to leave thousands of humans behind to die, and gives a speech, explaning that if they leave behind all those people, they aren't saving humanity, they are destroying it, since they would start the world anew with a horribly cruel act.
The American leader refuses to let the people on board. All of the other ships, ruled by other countries, agree to pause setting sail and open their doors to the thousands of people who didn't pay for tickets aboard the ships. The American leader then follows and allows non-paying passengers.
Everyone rushes on board, but there is a problem. Something is jammed in the American ship's motors, preventing the door from closing fully, and, because of poor design, they are unable to start the engines unless the door is sealed, even though the engines are fine. Jackson returns to the turbine room, but it is completely flooded. He is told it is a suicide mission, but goes for it anyway. He unjams the door, and it seals, just moments before the American ship crashes into Mount Everest. Jackson manages to survive and everyone lives happily aboard the boats.
27 days later, they make a discovery. All of the previous world's tallest mountains are no longer the tallest, and, in fact, one in Africa is. Due to the way the plates shifted, Africa was lifted several thousand feet into the air, and never flooded or received much damage at all. All of the ships set sail for Africa, with hopes that it will be in tact and able to hold human life.