How does digital photography works?

Can you answer this question?