How do capacitor become charged?

Can you answer this question?