Alien: Covenant - What Does The Ending Really Mean?
8. Walter Died, David Lives
As the film hurtles towards the climactic encounter with the Xenomorphs, David attempts to seduce Walter to the dark side, explaining his vision for genetic perfection (his alien clones) but the newer version rejects him and is "killed" for his sins. But he survives and reappears rescuing Daniels, and the pair of androids fight in the temple, with Walter seemingly getting the upper hand and smashing David's head in.
Later, it's revealed that David actually freed himself and killed Walter (we saw him reaching for a knife as Walter brought the stone down), and disguised himself as the American-accented droid to infiltrate the crew once more. It would perhaps have been better for David's fate to have been left slightly unresolved, but then again it's nice to have some sort of concrete answer in this franchise these days.
How he managed to escape and somehow get the time to remove his hand using acid and redo his hair remains to be seen, especially as he also manages to get Walter's security clearance codes our of him (and ignore his valuable memories at the same time).
And the most important part of his survival, of course, is that he also has two Face-Huggers with him, which will presumably be the key to birthing the queen responsible for the eggs seen later in Alien and Aliens. At least some further steps down the line, anyway.
What his actual plan is now is still a little unclear.