This is one of those weird areas where there is a lot of confusion because the Constitution requires the President to take the oath of office before discharging the duties of the office, but in reality, we’ve never been without a President. In the eyes of the government and the military and the Secret Service, there is never an interregnum, even if the oath hasn’t been taken. While it might not be exactly what the Constitution sets forth, the powers of the Presidency instantly changes hands when a President dies or resigns.
Using the Kennedy Assassination for example, the powers of the Presidency passed to LBJ as soon as President Kennedy was pronounced dead. And, even as JFK was being worked on in the trauma room at Parkland Hospital in Dallas, the Secret Service recognized that he wasn’t going to survive and immediately began switching protection to LBJ. Some Secret Service agents regularly on JFK’s detail didn’t even know what to do at the time because there was no precedent for the protection of a deceased President’s family. They questioned who would go with LBJ from Parkland to Love Field – LBJ’s regular Secret Service detail, or the regular Presidential detail (since, to them, LBJ was now President – even if he hadn’t yet been sworn in). Even when people addressed LBJ at Parkland Hospital, minutes after President Kennedy was officially pronounced dead, they addressed him as “Mr. President”. Technically, he hadn’t raised his right hand and taken the Presidential oath, but he was President – and that’s how it’s been with every other transition.
There is never an instant where we don’t have a President because it’s potentially dangerous, and continuity-of-government is an extraordinarily important part of maintaining a democratic republic. The people need to know that somebody is always in charge, and our enemies always need to know that we will never be caught sleeping. That’s why we have “designated survivors” – individual officers in the Presidential line of succession that are taken to a safe place or undisclosed location during events like the State of the Union Address when most of the rest of the people in the line of succession are gathered in one place. That’s also why a nuclear football travels everywhere the Vice President goes, too. If there was a sudden nuclear attack on Washington, D.C. that took out the President and most of Congress while the Vice President was out of town, we wouldn’t wait for the VP to be sworn in as President. The VP has the same type of military aide as the President and the same authentication card for launching nuclear weapons as the President, so if something happens to the POTUS, the VP can take charge as Commander-in-Chief and launch retaliatory strikes, if necessary.
You asked about what would happen if the President hadn’t been declared dead. In that case, there are contingency plans under the 25th Amendment, but it depends on the situation. If there is the possibility of recovery, power can be transferred to the Vice President (or whomever is next in the line of succession) while an injured or ailing President is recovering. The President can transfer power to the VP himself with a letter to the Speaker of the House and President pro tempore of the Senate, and the VP would be Acting President until the President notifies the same two leaders that he is able to reclaim his office and discharge the duties.
But if the President is incapacitated and unable to transfer power to the VP by letter, there is another way to enact the 25th Amendment – and this would also be something necessary if a President was incapacitated and refusing to transfer power (an example of this is Woodrow Wilson clinging to office after his debilitating stroke, or if a President was clearly declining due to Alzheimer’s disease but wouldn’t resign). In that case, the Vice President and either a majority of “the principal officers of the executive department” (the Cabinet secretaries) or a majority of Congress could notify (by writing) the Speaker of the House and President pro tempore of the Senate of the President’s irreparable incapacitation. Then, it would require a 2/3rds majority from both the House of Representatives and the Senate to transfer power to the Vice President or next in the line of succession as Acting President.
The Constitution does specifically require that the President take the oath (or “affirmation) of office "Before he enter upon the Execution of his Office…” and that tends to be the first thing that a President actually does, but a President becomes President at the moment their predecessor’s term ends. Fortunately, we haven’t had any sort of Constitutional crisis where a new President who has not yet taken the oath has issued an order and been rebuffed by someone who says, “Ummm…you didn’t say the magic 35 words."