Well, it depends on the exact situation. Under the Regency Act 1937, the Regent is the next person in the line of succession over the age of 21. It's slightly different if the Sovereign is temporarily incapacitated, however; in that situation they're replaced by five Counsellors of State, who would be the Sovereign's consort and the next four people in the line of succession.
To get the Monarch declared incapacited, you need the agreement of at least three of the following; the consort of the Sovereign, the Lord Chancellor, the Speaker of the House of Commons, the Lord Chief Justice of England and the Master of the Rolls. So, if the Queen were to go into a temporary coma, we'd see a formal declaration to this effect and her functions jointly carried out by the rest of the Royal Family. This techically happens all the time even without a declaration; the Counsellors of State often perform functions on behalf of the Queen when she's abroad or (as presently) in hospital. When a senior member of the Royal Family visits a Commonwealth country, they're often doing it in this capacity.
If King William dies in an accident leaving a young child as heir, then Prince Harry would be Regent; if William survives the accident but is left in a coma, you'd see what amounts to a temporary Regency Council comprised of Kate, Harry, Prince Andrew, Beatrice, and Eugenie, replaced by a proper Regency if he shows no sign of waking up.