How could Jesus be the son of David who was born hundreds of years before him?

Matthew 1:1